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

This commit is contained in:
Nathan Gray 2012-07-23 20:06:54 +00:00
parent e5c508a609
commit 60f474da12

View File

@ -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); if ($name) $this->read($name,$template='default',$lang='default',$group=0,$version='',$load_via);
// generate new etemplate request object // generate new etemplate request object, if not already existing
self::$request = etemplate_request::read(); if(!self::$request)
self::$request->content = array(); {
self::$request = etemplate_request::read();
self::$request->content = array();
}
} }
/** /**