From 8462b24d8007b329787edc2b70fbd50730d70445 Mon Sep 17 00:00:00 2001 From: Christian Helbling Date: Wed, 27 Apr 2011 12:37:41 +0000 Subject: moved what debug output from auto_prepend to it_html, now implemented as "help" debug variable and with toggle links --- it_html.class | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index b1395c2..0b68f75 100644 --- a/it_html.class +++ b/it_html.class @@ -206,6 +206,20 @@ function body($args) if ($this->p['use_it_state']) array_unshift($args, tag('iframe', array('id' => "it_state", 'src' => "/itjs/state.html", 'width' => 1, 'height' => 1, 'frameborder' => 0))); + if (EDC('help')) + { + ksort($GLOBALS['ULTRADEBUGVARS']); + foreach ($GLOBALS['ULTRADEBUGVARS'] as $var => $dummy) + { + if (EDC($var)) + $toggled_host = preg_replace("/$var\./", "", $_SERVER['HTTP_HOST']); + else + $toggled_host = preg_replace("/\.([^.]*)\.([^.]*)\.([^.]*)$/", ".$var.\$1.\$2.\$3", $_SERVER['HTTP_HOST']); + $debug_links[] = a(array('href' => U('http://' . $toggled_host . $_SERVER['REQUEST_URI']), 'style' => 'font-weight:' . (EDC($var) ? 'bold' : 'normal') . ';'), $var); + } + $args[] = div(array('style' => 'font-family:monospace;'), "Debugvars: " . join(" ", $debug_links)); + } + if ($this->p['show_boot_dom']) $args[] = div(array('id' => "it_boot_dom", 'style' => "visibility:hidden")); -- cgit v1.2.3