Changeset 737f0da3 in github


Ignore:
Timestamp:
Jun 9, 2009 4:35:17 AM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
2dd7ee3
Parents:
ed205f4
Message:

Allow rcube_plugin::task to be a regular expression defining several tasks (e.g. mail|settings)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_plugin_api.php

    r7dbe2fa r737f0da3  
    9090          $plugin = new $plugin_name($this); 
    9191          // check inheritance and task specification 
    92           if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || $plugin->task == $rcmail->task)) { 
     92          if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/('.$plugin->task.')/i', $rcmail->task))) { 
    9393            $plugin->init(); 
    9494            $this->plugins[] = $plugin; 
Note: See TracChangeset for help on using the changeset viewer.