aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 4545e1e8d..734c20d79 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)
);
+
}
/**
@@ -553,7 +559,7 @@ function get_widget_info($widget){
$checkpaths = [
"Zotlabs/SiteWidget/$ucwidget.php",
- "Zotlibs/Widget/$ucwidget.php",
+ "Zotlabs/Widget/$ucwidget.php",
"addon/$ucwidget/$ucwidget.php",
"addon/$widget.php"
];