Make $force parameter only override the task check for required plugins (#1489437)

pull/156/head
Thomas Bruederli 11 years ago
parent f9c8e8285b
commit fa635d8862

@ -198,7 +198,7 @@ class rcube_plugin_api
// check inheritance... // check inheritance...
if (is_subclass_of($plugin, 'rcube_plugin')) { if (is_subclass_of($plugin, 'rcube_plugin')) {
// ... task, request type and framed mode // ... task, request type and framed mode
if ($force || (!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $this->task)) if (($force || !$plugin->task || preg_match('/^('.$plugin->task.')$/i', $this->task))
&& (!$plugin->noajax || (is_object($this->output) && $this->output->type == 'html')) && (!$plugin->noajax || (is_object($this->output) && $this->output->type == 'html'))
&& (!$plugin->noframe || empty($_REQUEST['_framed'])) && (!$plugin->noframe || empty($_REQUEST['_framed']))
) { ) {

Loading…
Cancel
Save