aboutsummaryrefslogtreecommitdiffstats
path: root/util/addons
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-31 17:32:51 -0700
committerredmatrix <git@macgirvin.com>2016-03-31 17:32:51 -0700
commitc0b3d7e1b480ceeed89b71efd056ed9edda2dfef (patch)
tree433552545eb0c746fb48666afdb74ff472bf17b1 /util/addons
parent50d9b2934742ad9fb0dc8354d405789e3c14cd00 (diff)
parent9abd95fad3784a10fc48bc40f9b8a75d7d74edda (diff)
downloadvolse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.tar.gz
volse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.tar.bz2
volse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.zip
Merge branch 'static'
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";
}
}