summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-06-09 08:35:17 +0000
committerthomascube <thomas@roundcube.net>2009-06-09 08:35:17 +0000
commit737f0da348f78b02eafa9607fb2a1d9adc8e569b (patch)
tree4fed7af89db6128e6ed3d7b407411d53c16251e4
parented205f41836e4b3735c0a5a2da61cd8304bdbad0 (diff)
Allow rcube_plugin::task to be a regular expression defining several tasks (e.g. mail|settings)
-rw-r--r--program/include/rcube_plugin_api.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index 5103ce156..52bbc40b5 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -89,7 +89,7 @@ class rcube_plugin_api
if (class_exists($plugin_name, false)) {
$plugin = new $plugin_name($this);
// check inheritance and task specification
- if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || $plugin->task == $rcmail->task)) {
+ if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/('.$plugin->task.')/i', $rcmail->task))) {
$plugin->init();
$this->plugins[] = $plugin;
}