mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fixes #1875 - Remove crons installed by plugin.
This commit is contained in:
@@ -1643,6 +1643,9 @@ class e107plugin
|
||||
|
||||
e107::getConfig('core')->setPref('plug_installed', $p_installed);
|
||||
|
||||
|
||||
$this->removeCrons($plug_vars);
|
||||
|
||||
}
|
||||
|
||||
e107::getMessage()->addDebug("updated Installed plugins pref: ".print_a($p_installed,true));
|
||||
@@ -1701,6 +1704,25 @@ class e107plugin
|
||||
}
|
||||
|
||||
|
||||
private function removeCrons($plug_vars)
|
||||
{
|
||||
|
||||
if(!file_exists(e_PLUGIN. $plug_vars['folder']."/e_cron.php"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(e107::getDb()->delete('cron', 'cron_function LIKE "'. $plug_vars['folder'] . '::%"'))
|
||||
{
|
||||
e107::getMessage()->addDebug($plug_vars['folder']." crons removed successfully."); // No LAN necessary
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parse {plugin}_sql.php file and install/upgrade/uninstall tables.
|
||||
* @param $function string install|upgrade|uninstall
|
||||
|
Reference in New Issue
Block a user