| | |
| | | */ |
| | | private function __construct() |
| | | { |
| | | $rcmail = rcmail::get_instance(); |
| | | $this->dir = realpath($rcmail->config->get('plugins_dir')); |
| | | $this->dir = INSTALL_PATH . $this->url; |
| | | } |
| | | |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | private function template_container_hook($attrib) |
| | | { |
| | | $container = $attrib['name']; |
| | | return array('content' => $this->template_contents[$container]); |
| | | return array('content' => $attrib['content'] . $this->template_contents[$container]); |
| | | } |
| | | |
| | | /** |