summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Helbling2011-04-27 12:37:41 +0000
committerChristian Helbling2011-04-27 12:37:41 +0000
commit8462b24d8007b329787edc2b70fbd50730d70445 (patch)
tree1384b6c3cb9d35ff32757e0d55ed9c4520a59e3c
parent4709c7ac661b218cc01a1442af66bf8ce472ced0 (diff)
downloaditools-8462b24d8007b329787edc2b70fbd50730d70445.tar.gz
itools-8462b24d8007b329787edc2b70fbd50730d70445.tar.bz2
itools-8462b24d8007b329787edc2b70fbd50730d70445.zip
moved what debug output from auto_prepend to it_html, now implemented as "help" debug variable and with toggle links
-rw-r--r--it_html.class14
1 files changed, 14 insertions, 0 deletions
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"));