diff options
author | Christian Schneider | 2023-05-24 14:08:12 +0200 |
---|---|---|
committer | Christian Schneider | 2023-05-24 14:08:12 +0200 |
commit | a905a24337ddcb4b3405411354ea274c0342baa4 (patch) | |
tree | c8535bea0efeb2a9ae6e4e099eb32270438e7b22 /it_html.class | |
parent | 2da0d3f54d985ac63feadb7db708d3470de4a167 (diff) | |
download | itools-a905a24337ddcb4b3405411354ea274c0342baa4.tar.gz itools-a905a24337ddcb4b3405411354ea274c0342baa4.tar.bz2 itools-a905a24337ddcb4b3405411354ea274c0342baa4.zip |
Use -- for debug params with EDC('what')
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/it_html.class b/it_html.class index 93057bd..7423513 100644 --- a/it_html.class +++ b/it_html.class @@ -254,12 +254,12 @@ function body($args) foreach ($debugvars as $var => $dummy) { if (EDC($var)) - $toggled_host = preg_replace("/$var\./", "", $_SERVER['HTTP_HOST']); + $toggled_host = preg_replace("/(\.|--)$var(-[^.-]+)?/", "", $_SERVER['HTTP_HOST']); else - $toggled_host = preg_replace("/\.([^.]*)\.([^.]*)\.([^.]*)$/", ".$var.\$1.\$2.\$3", $_SERVER['HTTP_HOST']); + $toggled_host = preg_replace('/^(\w+(-\w+)*)/', "\$1--$var", $_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' => 'position:fixed; bottom:0; z-index:9999; font-family:monospace'), "Debugvars: " . implode(" ", $debug_links)); + $args[] = div(array('style' => 'position:fixed; bottom:0; z-index:9999; font-family:monospace; background:white'), "Debugvars: " . implode(" ", $debug_links)); } return $this->head() . $this->_tag('body', $args); |