1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Merge pull request #3537 from Deltik/fix-3536

Ensure plugin files are registered in database before installing any plugin
This commit is contained in:
Cameron
2018-11-02 11:30:14 -07:00
committed by GitHub

View File

@@ -4148,15 +4148,19 @@ class e107plugin
$text = '';
e107::getPlug()->clearCache();
// install plugin ...
$plug = e107plugin::getPluginRecord($id);
// XXX: The code below does not actually check if the plugin is in the database table.
if(!is_array($plug))
{
$message = $id." is missing from the plugin db table";
$this->log($message);
return $message;
}
// XXX: The code above does not actually check if the plugin is in the database table.
$plug['plug_action'] = !empty($options['function']) ? $options['function'] : 'install';