From ddafe4e4109a8d6d412c3c138412ee2ca3d58dbf Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 27 Oct 2012 10:12:37 -0400
Subject: [PATCH] Merge branch 'dev-compose-newwindow'
---
program/include/rcube_output_html.php | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index 2e3cd50..d421718 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -77,6 +77,9 @@
$this->set_skin($skin);
$this->set_env('skin', $skin);
+ if (!empty($_REQUEST['_extwin']))
+ $this->set_env('extwin', 1);
+
// add common javascripts
$this->add_script('var '.rcmail::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top');
@@ -298,6 +301,8 @@
*/
public function redirect($p = array(), $delay = 1)
{
+ if ($this->env['extwin'])
+ $p['extwin'] = 1;
$location = $this->app->url($p);
header('Location: ' . $location);
exit;
@@ -1068,7 +1073,7 @@
else if (in_array($attrib['command'], $a_static_commands)) {
$attrib['href'] = $this->app->url(array('action' => $attrib['command']));
}
- else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) {
+ else if (($attrib['command'] == 'permaurl' || $attrib['command'] == 'extwin') && !empty($this->env['permaurl'])) {
$attrib['href'] = $this->env['permaurl'];
}
}
@@ -1380,6 +1385,10 @@
$hiddenfield = new html_hiddenfield(array('name' => '_framed', 'value' => '1'));
$hidden = $hiddenfield->show();
}
+ if ($this->env['extwin']) {
+ $hiddenfield = new html_hiddenfield(array('name' => '_extwin', 'value' => '1'));
+ $hidden = $hiddenfield->show();
+ }
if (!$content)
$attrib['noclose'] = true;
--
Gitblit v1.9.1