summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Helbling2018-10-08 09:15:19 +0200
committerChristian Helbling2018-10-08 09:15:19 +0200
commit51ed968a13e1664bd256e2adafcb1d5e3c4f4095 (patch)
tree976e16740ebaf651390435f80a1253252aa57e3a /it.class
parentadadae917b981ec4cccc29951a0bf22edb8fe380 (diff)
downloaditools-51ed968a13e1664bd256e2adafcb1d5e3c4f4095.tar.gz
itools-51ed968a13e1664bd256e2adafcb1d5e3c4f4095.tar.bz2
itools-51ed968a13e1664bd256e2adafcb1d5e3c4f4095.zip
put behaviour of --debug in it::getopt into it_debug::set so we can use that in other places as well - for example in runtests
Diffstat (limited to 'it.class')
-rw-r--r--it.class11
1 files changed, 1 insertions, 10 deletions
diff --git a/it.class b/it.class
index 896d16f..0a3fc18 100644
--- a/it.class
+++ b/it.class
@@ -902,16 +902,7 @@ static function getopt($usage, $p = array())
}
if ($result['debug'])
- {
- foreach (preg_split('/[.,]/', $result['debug']) as $ultrad)
- {
- $ultravar = preg_split('/[-=:]/', $ultrad, 2);
- $GLOBALS["debug_$ultravar[0]"] = isset($ultravar[1]) ? $ultravar[1] : 1;
- }
-
- # keep debug parameters in subrequests
- $_SERVER['ULTRAHOSTNAME'] = it::replace(['^\.+' => '', '([^.])\.*$' => '\1.'], $result['debug']) . $_SERVER['ULTRAHOSTNAME'];
- }
+ it_debug::set($result['debug']);
$GLOBALS['it_stdin']['args'] = $result['args'] ? $result['args'] : array("-");
it::_stdin_next();