allow uninstall of plugins which no longer exists via cmdline tool
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user