Changeset 4154 in subversion
- Timestamp:
- Oct 29, 2010 4:42:28 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_plugin.php (modified) (1 diff)
-
program/include/rcube_plugin_api.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4152 r4154 55 55 - Plugin API: added 'contact_form' hook 56 56 - Add SORT=DISPLAY support (RFC 5957) 57 - Plugin API: add possibility to disable plugin in AJAX mode, 'noajax' property 58 - Plugin API: add possibility to disable plugin in framed mode, 'noframe' property 57 59 58 60 RELEASE 0.4.2 -
trunk/roundcubemail/program/include/rcube_plugin.php
r4091 r4154 27 27 abstract class rcube_plugin 28 28 { 29 /** 30 * Class name of the plugin instance 31 * 32 * @var string 33 */ 29 34 public $ID; 30 35 31 36 /** 32 * Holds an istance of Plugin API37 * Instance of Plugin API 33 38 * 34 39 * @var rcube_plugin_api 35 40 */ 36 41 public $api; 42 43 /** 44 * Regular expression defining task(s) to bind with 45 * 46 * @var string 47 */ 37 48 public $task; 49 50 /** 51 * Disables plugin in AJAX requests 52 * 53 * @var boolean 54 */ 55 public $noajax = false; 56 57 /** 58 * Disables plugin in framed mode 59 * 60 * @var boolean 61 */ 62 public $noframe = false; 63 38 64 protected $home; 39 65 protected $urlbase; 40 66 private $mytask; 67 41 68 42 69 /** -
trunk/roundcubemail/program/include/rcube_plugin_api.php
r4091 r4154 123 123 if (class_exists($plugin_name, false)) { 124 124 $plugin = new $plugin_name($this); 125 // check inheritance and task specification 126 if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $rcmail->task))) { 127 $plugin->init(); 128 $this->plugins[] = $plugin; 125 // check inheritance... 126 if (is_subclass_of($plugin, 'rcube_plugin')) { 127 // ... task, request type and framed mode 128 if ((!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $rcmail->task)) 129 && (!$plugin->noajax || is_a($this->output, 'rcube_template')) 130 && (!$plugin->noframe || empty($_REQUEST['_framed'])) 131 ) { 132 $plugin->init(); 133 $this->plugins[] = $plugin; 134 } 129 135 } 130 136 } … … 257 263 else if (strpos($action, 'plugin.') !== 0) 258 264 $action = 'plugin.'.$action; 259 265 260 266 // can register action only if it's not taken or registered by myself 261 267 if (!isset($this->actionmap[$action]) || $this->actionmap[$action] == $owner) {
Note: See TracChangeset
for help on using the changeset viewer.
