aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-05 16:19:23 -0700
committerzotlabs <mike@macgirvin.com>2018-05-05 16:19:23 -0700
commitb2218574ee56c1611fa2869c5b2630ff4f41803c (patch)
tree1d06a26f436918ae4a0b7b5c42f29757a08fc55f /include/plugin.php
parent70a0a833632fe125306e309414475efedb0e29bc (diff)
downloadvolse-hubzilla-b2218574ee56c1611fa2869c5b2630ff4f41803c.tar.gz
volse-hubzilla-b2218574ee56c1611fa2869c5b2630ff4f41803c.tar.bz2
volse-hubzilla-b2218574ee56c1611fa2869c5b2630ff4f41803c.zip
allow uninstall of plugins which no longer exists via cmdline tool
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 4545e1e8d..28d27619f 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -53,10 +53,15 @@ function unload_plugin($plugin){
* @return boolean
*/
function uninstall_plugin($plugin) {
+
unload_plugin($plugin);
- if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
+ if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php')) {
+ q("DELETE FROM addon WHERE aname = '%s' ",
+ dbesc($plugin)
+ );
return false;
+ }
logger("Addons: uninstalling " . $plugin);
//$t = @filemtime('addon/' . $plugin . '/' . $plugin . '.php');
@@ -73,6 +78,7 @@ function uninstall_plugin($plugin) {
q("DELETE FROM addon WHERE aname = '%s' ",
dbesc($plugin)
);
+
}
/**