|
@@ -81,8 +81,6 @@ abstract class Controller
|
|
|
|
|
|
$this->_router = $router ? $router : new GenericRouter();
|
|
|
|
|
|
- // commented out for testing because we do not need a session or a render engine
|
|
|
- /*
|
|
|
if ($context)
|
|
|
{
|
|
|
$this->Context =& $context;
|
|
@@ -93,17 +91,18 @@ abstract class Controller
|
|
|
$this->Context->GUID = "CTX_" . $this->GUID;
|
|
|
}
|
|
|
|
|
|
- // assign some variables globally for the views
|
|
|
- $this->Assign("CURRENT_USER",$this->GetCurrentUser());
|
|
|
- $this->Assign("URL",$this->GetRouter());
|
|
|
- $this->Assign("BROWSER_DEVICE",$this->GetDevice());
|
|
|
-
|
|
|
- // if feedback was persisted, set it
|
|
|
- $this->Assign("feedback",$this->Context->Get("feedback"));
|
|
|
- $this->Context->Set("feedback",null);
|
|
|
+ if ($this->RenderEngine)
|
|
|
+ {
|
|
|
+ // assign some variables globally for the views
|
|
|
+ $this->Assign("CURRENT_USER",$this->GetCurrentUser());
|
|
|
+ $this->Assign("URL",$this->GetRouter());
|
|
|
+ $this->Assign("BROWSER_DEVICE",$this->GetDevice());
|
|
|
+
|
|
|
+ // if feedback was persisted, set it
|
|
|
+ $this->Assign("feedback",$this->Context->Get("feedback"));
|
|
|
+ $this->Context->Set("feedback",null);
|
|
|
+ }
|
|
|
|
|
|
- */
|
|
|
-
|
|
|
$this->Init();
|
|
|
}
|
|
|
|