Aleksander Machniak
2013-03-27 648fcf570964ad512d18d6df7e07d5bcec2ae830
program/lib/Roundcube/rcube_plugin_api.php
@@ -36,6 +36,7 @@
    public $task = '';
    public $output;
    public $handlers = array();
    public $allowed_prefs = array();
    protected $plugins = array();
    protected $tasks = array();
@@ -202,6 +203,11 @@
                        $plugin->init();
                        $this->plugins[$plugin_name] = $plugin;
                    }
                    if (!empty($plugin->allowed_prefs)) {
                        $this->allowed_prefs = array_merge($this->allowed_prefs, $plugin->allowed_prefs);
                    }
                    return true;
                }
            }
@@ -372,7 +378,7 @@
    /**
     * Register this plugin to be responsible for a specific task
     *
     * @param string $task Task name (only characters [a-z0-9_.-] are allowed)
     * @param string $task Task name (only characters [a-z0-9_-] are allowed)
     * @param string $owner Plugin name that registers this action
     */
    public function register_task($task, $owner)
@@ -382,7 +388,7 @@
            return true;
        }
        if ($task != asciiwords($task)) {
        if ($task != asciiwords($task, true)) {
            rcube::raise_error(array('code' => 526, 'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,
                'message' => "Invalid task name: $task."