From 4eee212883b34e1ca7cfb9466580ff20dca5c979 Mon Sep 17 00:00:00 2001 From: JohnDoh Date: Sat, 16 Aug 2014 07:05:30 +0100 Subject: add include_plugin function for optoinal plugins --- program/lib/Roundcube/rcube_plugin.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'program/lib/Roundcube/rcube_plugin.php') diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index cc7c7977f..9c7a9c2dc 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -120,6 +120,17 @@ abstract class rcube_plugin return $this->api->load_plugin($plugin_name, true); } + /** + * Attempt to load the given plugin which is optional for the current plugin + * + * @param string Plugin name + * @return boolean True on success, false on failure + */ + public function include_plugin($plugin_name) + { + return $this->api->load_plugin($plugin_name, true, false); + } + /** * Load local config file from plugins directory. * The loaded values are patched over the global configuration. -- cgit v1.2.3