From cf1f0f97b23e1d22ee087436edc283da59bfb6ce Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 05 Feb 2008 16:39:08 -0500
Subject: [PATCH] Applied patch for updating page title (#1484727, #1484650)

---
 program/include/rcmail_template.inc |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc
index cc5a58a..bfc31d3 100644
--- a/program/include/rcmail_template.inc
+++ b/program/include/rcmail_template.inc
@@ -312,6 +312,13 @@
     if (!$this->framed && !empty($this->js_env))
       $out .= ($this->ajax_call ? 'this' : JS_OBJECT_NAME) . '.set_env('.json_serialize($this->js_env).");\n";
     
+    // add command to set page title
+    if ($this->ajax_call && !empty($this->pagetitle))
+      $out .= sprintf(
+        "this.set_pagetitle('%s');\n",
+        JQ((!empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : '') . $this->pagetitle)
+      );
+
     foreach ($this->js_commands as $i => $args)
     {
       $method = array_shift($args);
@@ -326,12 +333,7 @@
         join(',', $args));
     }
     
-    // add command to set page title
-    if ($this->ajax_call && !empty($this->pagetitle))
-      $out .= sprintf(
-        "this.set_pagetitle('%s');\n",
-        JQ((!empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : '') . $this->pagetitle)
-      );
+
     
     return $out;
   }

--
Gitblit v1.9.1