From 7b259aec6fdc2c0972cf3ab4169a1dffe50b5c3d Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 2 Nov 2018 10:07:59 -0500 Subject: [PATCH] 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 --- e107_handlers/plugin_class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index b9ac2e1f8..137a556d5 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -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';