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,10 +65,13 @@ 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
if(!self::$request)
{
self::$request = etemplate_request::read(); self::$request = etemplate_request::read();
self::$request->content = array(); self::$request->content = array();
} }
}
/** /**
* Abstracts a html-location-header call * Abstracts a html-location-header call