diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-07-25 10:19:19 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-07-25 10:19:19 +0200 |
commit | 1b1d11dcf1091158232e98abad966d4900e2ccc9 (patch) | |
tree | 380d5e04c73391089bf3d658ea4b27eecffa4916 /util/addons | |
parent | b655d04b3474893ee3dea99b77f2e7dd764729a0 (diff) | |
parent | 35200e5f1b10cdd18af8f0ea646996e438b97011 (diff) | |
download | volse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.tar.gz volse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.tar.bz2 volse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.zip |
Merge branch '3.6RC'
Diffstat (limited to 'util/addons')
-rwxr-xr-x | util/addons | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/addons b/util/addons index 150a7ca09..3d772bf73 100755 --- a/util/addons +++ b/util/addons @@ -106,9 +106,12 @@ if($argc == 3 && $argv[1] === 'install') { if($argc == 3 && $argv[1] === 'uninstall') { + $found = false; + if($plugins) { foreach($plugins as $p) { if($p[0] === $argv[2]) { + $found = true; if(! $p[1]) echo $p[0] . ' not installed.' . "\n"; elseif($p[2]['disabled']) @@ -125,6 +128,17 @@ if($argc == 3 && $argv[1] === 'uninstall') { } } + // force uninstall of addon which no longer exists + + if(! $found) { + $idx = array_search($argv[2], App::$plugins); + if ($idx !== false) + unset(App::$plugins[$idx]); + uninstall_plugin($argv[2]); + set_config("system","addon", implode(", ",App::$plugins)); + echo $argv[2] . ' uninstalled.' . "\n"; + } + killme(); } |