From 8c9bbfd676bf6ea8fdb8faf88f350a65b0d24f22 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 9 Jul 2012 21:24:47 +0000 Subject: [PATCH] Create the request object when the new etemplate object is created, otherwise it's not available for apps to set attributes --- etemplate/inc/class.etemplate.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index ac91b14a7c..f6ae4c0ad6 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -64,6 +64,9 @@ class etemplate_new extends etemplate_widget_template $this->sitemgr = isset($GLOBALS['Common_BO']) && is_object($GLOBALS['Common_BO']); if ($name) $this->read($name,$template='default',$lang='default',$group=0,$version='',$load_via); + + // generate new etemplate request object + self::$request = etemplate_request::read(); } /** @@ -116,8 +119,6 @@ class etemplate_new extends etemplate_widget_template if (!$this->rel_path) throw new egw_exception_assertion_failed('No (valid) template read!'); - // generate new etemplate request object - self::$request = etemplate_request::read(); self::$request->output_mode = $output_mode; // let extensions "know" they are run eg. in a popup self::$request->readonlys = $readonlys; self::$request->content = $content;