From 896b2204e85aafb7eece9e42a0fb4e3bf5a8551b Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 04 Jan 2012 07:37:51 -0500
Subject: [PATCH] - Backported r5704-r5705 from trunk
---
program/include/rcube_template.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 9a7bee7..ea22176 100755
--- a/program/include/rcube_template.php
+++ b/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.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']);
@@ -1105,6 +1109,7 @@
$input_task = new html_hiddenfield(array('name' => '_task', 'value' => 'login'));
$input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login'));
$input_tzone = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_'));
+ $input_dst = new html_hiddenfield(array('name' => '_dstactive', 'id' => 'rcmlogindst', 'value' => '_default_'));
$input_url = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url));
$input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser')
+ $attrib + $user_attrib);
@@ -1156,6 +1161,7 @@
$out = $input_task->show();
$out .= $input_action->show();
$out .= $input_tzone->show();
+ $out .= $input_dst->show();
$out .= $input_url->show();
$out .= $table->show();
--
Gitblit v1.9.1