aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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)
);
+
}
/**