summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_json_output.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-20 10:40:01 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-20 10:40:01 +0000
commit0a36d15be96a97059bc7792073bbfc3f5334b314 (patch)
tree2ee62a298054f7263a080a6fcaf7b1bbe1d1c19d /roundcubemail/program/include/rcube_json_output.php
parent2e81a5e6e7be614b87098f6c0b254e8b96e49fd7 (diff)
Store compose parameters in session and redirect to a unique URL
git-svn-id: https://svn.roundcube.net/trunk@1562 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_json_output.php')
-rw-r--r--roundcubemail/program/include/rcube_json_output.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_json_output.php b/roundcubemail/program/include/rcube_json_output.php
index 678b1948a..2f65c19e9 100644
--- a/roundcubemail/program/include/rcube_json_output.php
+++ b/roundcubemail/program/include/rcube_json_output.php
@@ -58,12 +58,14 @@ class rcube_json_output
}
/**
- * @ignore
+ * Issue command to set page title
+ *
+ * @param string New page title
*/
public function set_pagetitle($title)
{
- $name = $this->config->get('product_name');
- $this->command('set_pagetitle', JQ(empty($name) ? $title : $name.' :: '.$title));
+ $name = $this->config->get('product_name');
+ $this->command('set_pagetitle', JQ(empty($name) ? $title : $name.' :: '.$title));
}
/**
@@ -161,6 +163,19 @@ class rcube_json_output
$this->commands = array();
}
+ /**
+ * Redirect to a certain url
+ *
+ * @param mixed Either a string with the action or url parameters as key-value pairs
+ * @see rcmail::url()
+ */
+ public function redirect($p = array(), $delay = 0)
+ {
+ $location = rcmail::get_instance()->url($p);
+ $this->remote_response("window.setTimeout(\"location.href='{$location}'\", $delay);");
+ exit;
+ }
+
/**
* Send an AJAX response to the client.