1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Ensure plugin files are registered in DB before install

e107::getPlug()->clearCache() rescans the plugin folder for plugins and
adds them to the database.

Fixes: #3536
This commit is contained in:
Nick Liu 2018-11-02 10:07:59 -05:00
parent 4d0c0601d0
commit 7b259aec6f
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

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';