aboutsummaryrefslogtreecommitdiffstats
path: root/util/addons
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-31 16:06:03 -0700
committerredmatrix <git@macgirvin.com>2016-03-31 16:06:03 -0700
commit9abd95fad3784a10fc48bc40f9b8a75d7d74edda (patch)
tree3cf2eec6a29f384b80a8c607aa97172b84e37e62 /util/addons
parent256c228efd249f2ce93405db8e36f52030aa4876 (diff)
downloadvolse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.tar.gz
volse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.tar.bz2
volse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.zip
static App
Diffstat (limited to 'util/addons')
-rwxr-xr-xutil/addons20
1 files changed, 10 insertions, 10 deletions
diff --git a/util/addons b/util/addons
index 2c128c50e..8fcd40cbc 100755
--- a/util/addons
+++ b/util/addons
@@ -25,7 +25,7 @@ $a = get_app();
if($plugs)
$plugins_arr = explode(',', str_replace(' ', '', $plugs));
- $a->plugins = $plugins_arr;
+ App::$plugins = $plugins_arr;
$plugins = array();
$files = glob('addon/*/');
@@ -34,15 +34,15 @@ $a = get_app();
if(is_dir($file)){
list($tmp, $id) = array_map('trim', explode('/', $file));
$info = get_plugin_info($id);
- $enabled = in_array($id,$a->plugins);
+ $enabled = in_array($id,App::$plugins);
$x = check_plugin_versions($info);
if($enabled && ! $x) {
$enabled = false;
- $idz = array_search($id, $a->plugins);
+ $idz = array_search($id, App::$plugins);
if ($idz !== false) {
- unset($a->plugins[$idz]);
+ unset(App::$plugins[$idz]);
uninstall_plugin($id);
- set_config("system","addon", implode(", ",$a->plugins));
+ set_config("system","addon", implode(", ",App::$plugins));
}
}
$info['disabled'] = 1-intval($x);
@@ -91,9 +91,9 @@ if($argc == 3 && $argv[1] === 'install') {
elseif($p[2]['disabled'])
echo $p[0] . ' disabled (version compatibility).' . "\n";
else {
- $a->plugins[] = $p[0];
+ App::$plugins[] = $p[0];
install_plugin($p[0]);
- set_config("system","addon", implode(", ",$a->plugins));
+ set_config("system","addon", implode(", ",App::$plugins));
echo $p[0] . ' installed.' . "\n";
}
}
@@ -115,11 +115,11 @@ if($argc == 3 && $argv[1] === 'uninstall') {
elseif($p[2]['disabled'])
echo $p[0] . ' disabled (version compatibility).' . "\n";
else {
- $idx = array_search($p[0], $a->plugins);
+ $idx = array_search($p[0], App::$plugins);
if ($idx !== false)
- unset($a->plugins[$idx]);
+ unset(App::$plugins[$idx]);
uninstall_plugin($p[0]);
- set_config("system","addon", implode(", ",$a->plugins));
+ set_config("system","addon", implode(", ",App::$plugins));
echo $p[0] . ' uninstalled.' . "\n";
}
}