From ef27a6a72375c92850c4ed17fa7476c6fb188d37 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 15 Apr 2011 12:07:01 -0400
Subject: [PATCH] Add hook for request token creation (upon user request)

---
 program/include/rcube_template.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index f66b290..0a64d1c 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -69,7 +69,6 @@
 
         //$this->framed = $framed;
         $this->set_env('task', $task);
-        $this->set_env('request_token', $this->app->get_request_token());
 
         // load the correct skin (in case user-defined)
         $this->set_skin($this->config['skin']);
@@ -342,6 +341,9 @@
         else if ($unlock) {
             array_unshift($this->js_commands, array('hide_message', $unlock));
         }
+
+        $this->set_env('request_token', $this->app->get_request_token());
+
         // write all env variables to client
         $js = $this->framed ? "if(window.parent) {\n" : '';
         $js .= $this->get_js_commands() . ($this->framed ? ' }' : '');

--
Gitblit v1.9.1