From 60f474da12435f1f358940aae534b74a6be3f9ae Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 23 Jul 2012 20:06:54 +0000 Subject: [PATCH] Only create new request if it doesn't already exist. Fixes missing information when app constructor creates new template, and get_rows is called for the first time from a new instance --- etemplate/inc/class.etemplate.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index c0af2745fe..fe01100b71 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -65,9 +65,12 @@ class etemplate_new extends etemplate_widget_template if ($name) $this->read($name,$template='default',$lang='default',$group=0,$version='',$load_via); - // generate new etemplate request object - self::$request = etemplate_request::read(); - self::$request->content = array(); + // generate new etemplate request object, if not already existing + if(!self::$request) + { + self::$request = etemplate_request::read(); + self::$request->content = array(); + } } /**