From 827b1dd459e4e90797ed6fe3187dc6de47cf8fec Mon Sep 17 00:00:00 2001 From: Thomas B. <thomas@roundcube.net> Date: Thu, 21 Aug 2014 13:50:53 -0400 Subject: [PATCH] Merge pull request #212 from JohnDoh/patch-1 --- program/lib/Roundcube/rcube_plugin_api.php | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php index 335348c..dae3a93 100644 --- a/program/lib/Roundcube/rcube_plugin_api.php +++ b/program/lib/Roundcube/rcube_plugin_api.php @@ -170,10 +170,11 @@ * * @param string Plugin name * @param boolean Force loading of the plugin even if it doesn't match the filter + * @param boolean Require loading of the plugin, error if it doesn't exist * * @return boolean True on success, false if not loaded or failure */ - public function load_plugin($plugin_name, $force = false) + public function load_plugin($plugin_name, $force = false, $require = true) { static $plugins_dir; @@ -225,7 +226,7 @@ true, false); } } - else { + elseif ($require) { rcube::raise_error(array('code' => 520, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed to load plugin file $fn"), true, false); -- Gitblit v1.9.1