Aleksander Machniak
2012-12-18 0d214498d04439c29c9764fa291dcfde49701467
program/lib/Roundcube/rcube_plugin_api.php
@@ -2,8 +2,6 @@
/*
 +-----------------------------------------------------------------------+
 | program/include/rcube_plugin_api.php                                  |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2008-2011, The Roundcube Dev Team                       |
 |                                                                       |
@@ -13,15 +11,14 @@
 |                                                                       |
 | PURPOSE:                                                              |
 |   Plugins repository                                                  |
 |                                                                       |
 +-----------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
*/
// location where plugins are loade from
if (!defined('RCMAIL_PLUGINS_DIR'))
  define('RCMAIL_PLUGINS_DIR', INSTALL_PATH . 'plugins/');
if (!defined('RCUBE_PLUGINS_DIR'))
  define('RCUBE_PLUGINS_DIR', RCUBE_INSTALL_PATH . 'plugins/');
/**
@@ -78,7 +75,8 @@
    'identity_save'     => 'identity_update',
    // to be removed after 0.8
    'imap_init'         => 'storage_init',
    'mailboxes_list'    => 'storage_folders',
    'mailboxes_list'    => 'storage_folders',
    'imap_connect'      => 'storage_connect',
  );
  /**
@@ -101,7 +99,7 @@
   */
  protected function __construct()
  {
    $this->dir = slashify(RCMAIL_PLUGINS_DIR);
    $this->dir = slashify(RCUBE_PLUGINS_DIR);
  }
@@ -370,6 +368,10 @@
   */
  public function register_task($task, $owner)
  {
    // tasks are irrelevant in framework mode
    if (!class_exists('rcmail', false))
      return true;
    if ($task != asciiwords($task)) {
      rcube::raise_error(array('code' => 526, 'type' => 'php',
        'file' => __FILE__, 'line' => __LINE__,