From 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 24 Mar 2024 09:58:21 +0000 Subject: Deprecate *_config() functions in core. --- util/config | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'util/config') diff --git a/util/config b/util/config index cfe4500b5..c0f51b3fb 100755 --- a/util/config +++ b/util/config @@ -12,13 +12,14 @@ require_once('include/cli_startup.php'); cli_startup(); +use Zotlabs\Lib\Config; $helpArgs = getopt('h', array('help')); if (count($helpArgs) === 1) { echo <<<'EndOfOutput' Gets, sets, or lists site-wide configuration settings. -Usage: util/config +Usage: util/config util/config util/config util/config @@ -36,8 +37,8 @@ Usage: util/config Set config entry for specified family and key to value and display result Notes: - Setting config entries which are manually set in .htconfig.php may result - in conflict between database settings and the manual startup settings. + Setting config entries which are manually set in .htconfig.php may result + in conflict between database settings and the manual startup settings. For channel-specific configuration settings, use util/pconfig @@ -55,16 +56,16 @@ if($argc > 1 && strpos($argv[1],'.')) { } if($argc > 3) { - set_config($argv[1],$argv[2],$argv[3]); - echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n"; + Config::Set($argv[1],$argv[2],$argv[3]); + echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(Config::Get($argv[1],$argv[2])) . "\n"; } if($argc == 3) { - echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(get_config($argv[1],$argv[2])) . "\n"; + echo "config[{$argv[1]}][{$argv[2]}] = " . printable_config(Config::Get($argv[1],$argv[2])) . "\n"; } if($argc == 2) { - load_config($argv[1]); + Config::Load($argv[1]); foreach(App::$config[$argv[1]] as $k => $x) { echo "config[{$argv[1]}][{$k}] = " . $x . "\n"; } @@ -89,4 +90,4 @@ function printable_config($x) { } else return $x; -} \ No newline at end of file +} -- cgit v1.2.3