diff options
author | redmatrix <git@macgirvin.com> | 2016-02-03 20:24:46 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-02-03 20:24:46 -0800 |
commit | c75f76f740be16f9880650fcff359d7afd85991d (patch) | |
tree | 50e40fcb64de4dfa0c8dfa176c52e7319a1527d0 /util | |
parent | 28386d747115598ccd4851e049084219b2f99fef (diff) | |
download | volse-hubzilla-c75f76f740be16f9880650fcff359d7afd85991d.tar.gz volse-hubzilla-c75f76f740be16f9880650fcff359d7afd85991d.tar.bz2 volse-hubzilla-c75f76f740be16f9880650fcff359d7afd85991d.zip |
heavy lifting on admin security page
Diffstat (limited to 'util')
-rwxr-xr-x | util/config | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/util/config b/util/config index 67fe14f93..74a9219b5 100755 --- a/util/config +++ b/util/config @@ -8,12 +8,14 @@ require_once('include/cli_startup.php'); cli_startup(); if($argc > 3) { + + set_config($argv[1],$argv[2],$argv[3]); - echo "config[{$argv[1]}][{$argv[2]}] = " . get_config($argv[1],$argv[2]) . "\n"; + echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n"; } if($argc == 3) { - echo "config[{$argv[1]}][{$argv[2]}] = " . get_config($argv[1],$argv[2]) . "\n"; + echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n"; } if($argc == 2) { @@ -27,8 +29,19 @@ if($argc == 1) { $r = q("select * from config where 1"); if($r) { foreach($r as $rr) { - echo "config[{$rr['cat']}][{$rr['k']}] = " . $rr['v'] . "\n"; + echo "config[{$rr['cat']}][{$rr['k']}] = " . printable_config($rr['v']) . "\n"; } } } +function printable_config($x) { + $s = ''; + if(is_array($x)) { + foreach($x as $v) { + $s .= $v . "\n"; + } + return $s; + } + else + return $x; +}
\ No newline at end of file |