aboutsummaryrefslogtreecommitdiffstats
path: root/util/addons
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-03-24 09:58:21 +0000
committerMario <mario@mariovavti.com>2024-03-24 09:58:21 +0000
commit0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch)
tree4ad4413b0c00d1a478111b031d9de46218f31a89 /util/addons
parentacc1834b0dc4804703610101fa95a3375649bc45 (diff)
downloadvolse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip
Deprecate *_config() functions in core.
Diffstat (limited to 'util/addons')
-rwxr-xr-xutil/addons20
1 files changed, 11 insertions, 9 deletions
diff --git a/util/addons b/util/addons
index 7bd70984e..f700dfcf7 100755
--- a/util/addons
+++ b/util/addons
@@ -19,7 +19,9 @@ require_once('include/cli_startup.php');
cli_startup();
- $plugs = get_config('system', 'addon');
+use Zotlabs\Lib\Config;
+
+ $plugs = Config::Get('system', 'addon');
$plugins_arr = array();
if($plugs)
@@ -42,7 +44,7 @@ cli_startup();
if ($idz !== false) {
unset(App::$plugins[$idz]);
uninstall_plugin($id);
- set_config("system","addon", implode(", ",App::$plugins));
+ Config::Set("system","addon", implode(", ",App::$plugins));
}
}
$info['disabled'] = 1-intval($x);
@@ -65,7 +67,7 @@ if($argc == 2 && $argv[1] === 'list') {
echo $p[0] . "\n";
}
}
- }
+ }
killme();
}
@@ -89,7 +91,7 @@ if($argc == 3 && $argv[1] === 'list' && $argv[2] === 'all') {
foreach($plugins as $p) {
echo $p[0] . (($p[1]) ? $p[1] : (($p[2]['disabled']) ? '!' : '')) . "\n";
}
- }
+ }
killme();
}
@@ -107,12 +109,12 @@ if($argc == 3 && $argv[1] === 'install') {
else {
App::$plugins[] = $p[0];
install_plugin($p[0]);
- set_config("system","addon", implode(", ",App::$plugins));
+ Config::Set("system","addon", implode(", ",App::$plugins));
echo $p[0] . ' installed.' . "\n";
}
}
}
- }
+ }
killme();
}
@@ -136,12 +138,12 @@ if($argc == 3 && $argv[1] === 'uninstall') {
if ($idx !== false)
unset(App::$plugins[$idx]);
uninstall_plugin($p[0]);
- set_config("system","addon", implode(", ",App::$plugins));
+ Config::Set("system","addon", implode(", ",App::$plugins));
echo $p[0] . ' uninstalled.' . "\n";
}
}
}
- }
+ }
// force uninstall of addon which no longer exists
@@ -150,7 +152,7 @@ if($argc == 3 && $argv[1] === 'uninstall') {
if ($idx !== false)
unset(App::$plugins[$idx]);
uninstall_plugin($argv[2]);
- set_config("system","addon", implode(", ",App::$plugins));
+ Config::Set("system","addon", implode(", ",App::$plugins));
echo $argv[2] . ' uninstalled.' . "\n";
}