diff options
author | zotlabs <mike@macgirvin.com> | 2019-08-15 16:28:06 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-08-15 16:28:06 -0700 |
commit | beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1 (patch) | |
tree | c65244157a35c7ef99febfa5a27ad037a27cd8cb /Zotlabs/Module/Admin/Addons.php | |
parent | 6f8c977e73d4d8a74371c8da4d5763d1e401d62e (diff) | |
download | volse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.tar.gz volse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.tar.bz2 volse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.zip |
fix bitrot in util/zotsh
Diffstat (limited to 'Zotlabs/Module/Admin/Addons.php')
-rw-r--r-- | Zotlabs/Module/Admin/Addons.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Zotlabs/Module/Admin/Addons.php b/Zotlabs/Module/Admin/Addons.php index b8e3e3a2e..243eb242f 100644 --- a/Zotlabs/Module/Admin/Addons.php +++ b/Zotlabs/Module/Admin/Addons.php @@ -2,6 +2,7 @@ namespace Zotlabs\Module\Admin; +use App; use \Zotlabs\Storage\GitRepo; use \Michelf\MarkdownExtra; @@ -253,14 +254,14 @@ class Addons { * Single plugin */ - if (\App::$argc == 3){ - $plugin = \App::$argv[2]; + if (App::$argc == 3){ + $plugin = App::$argv[2]; if (!is_file("addon/$plugin/$plugin.php")){ notice( t("Item not found.") ); return ''; } - $enabled = in_array($plugin,\App::$plugins); + $enabled = in_array($plugin,App::$plugins); $info = get_plugin_info($plugin); $x = check_plugin_versions($info); @@ -268,11 +269,11 @@ class Addons { if($enabled && ! $x) { $enabled = false; - $idz = array_search($plugin, \App::$plugins); + $idz = array_search($plugin, App::$plugins); if ($idz !== false) { - unset(\App::$plugins[$idz]); + unset(App::$plugins[$idz]); uninstall_plugin($plugin); - set_config("system","addon", implode(", ",\App::$plugins)); + set_config("system","addon", implode(", ",App::$plugins)); } } $info['disabled'] = 1-intval($x); @@ -281,19 +282,19 @@ class Addons { check_form_security_token_redirectOnErr('/admin/addons', 'admin_addons', 't'); $pinstalled = false; // Toggle plugin status - $idx = array_search($plugin, \App::$plugins); + $idx = array_search($plugin, App::$plugins); if ($idx !== false){ - unset(\App::$plugins[$idx]); + unset(App::$plugins[$idx]); uninstall_plugin($plugin); $pinstalled = false; info( sprintf( t("Plugin %s disabled."), $plugin ) ); } else { - \App::$plugins[] = $plugin; + App::$plugins[] = $plugin; install_plugin($plugin); $pinstalled = true; info( sprintf( t("Plugin %s enabled."), $plugin ) ); } - set_config("system","addon", implode(", ",\App::$plugins)); + set_config("system","addon", implode(", ",App::$plugins)); if($pinstalled) { @require_once("addon/$plugin/$plugin.php"); @@ -305,7 +306,7 @@ class Addons { // display plugin details - if (in_array($plugin, \App::$plugins)){ + if (in_array($plugin, App::$plugins)){ $status = 'on'; $action = t('Disable'); } else { @@ -380,18 +381,18 @@ class Addons { list($tmp, $id) = array_map('trim', explode('/', $file)); $info = get_plugin_info($id); - $enabled = in_array($id,\App::$plugins); + $enabled = in_array($id,App::$plugins); $x = check_plugin_versions($info); // disable plugins which are installed but incompatible versions if($enabled && ! $x) { $enabled = false; - $idz = array_search($id, \App::$plugins); + $idz = array_search($id, App::$plugins); if ($idz !== false) { - unset(\App::$plugins[$idz]); + unset(App::$plugins[$idz]); uninstall_plugin($id); - set_config("system","addon", implode(", ",\App::$plugins)); + set_config("system","addon", implode(", ",App::$plugins)); } } $info['disabled'] = 1-intval($x); |