alecpl
2012-03-15 f451a1ca5eaff9dd52fd6ce99e2bb189dc539140
program/include/rcube_template.php
@@ -71,6 +71,7 @@
        //$this->framed = $framed;
        $this->set_env('task', $task);
        $this->set_env('x_frame_options', $this->app->config->get('x_frame_options', 'sameorigin'));
        // load the correct skin (in case user-defined)
        $this->set_skin($this->config['skin']);
@@ -217,7 +218,9 @@
    public function command()
    {
        $cmd = func_get_args();
        if (strpos($cmd[0], 'plugin.') === false)
        if (strpos($cmd[0], 'plugin.') !== false)
          $this->js_commands[] = array('triggerEvent', $cmd[0], $cmd[1]);
        else
          $this->js_commands[] = $cmd;
    }
@@ -913,6 +916,7 @@
            // make valid href to specific buttons
            if (in_array($attrib['command'], rcmail::$main_tasks)) {
                $attrib['href'] = rcmail_url(null, null, $attrib['command']);
                $attrib['onclick'] = sprintf("%s.command('switch-task','%s');return false", JS_OBJECT_NAME, $attrib['command']);
            }
            else if ($attrib['task'] && in_array($attrib['task'], rcmail::$main_tasks)) {
                $attrib['href'] = rcmail_url($attrib['command'], null, $attrib['task']);