Browse Source

update to latest phreeze version

Jason Hinkle 12 years ago
parent
commit
567e003050
1 changed files with 11 additions and 12 deletions
  1. 11 12
      phreeze/libs/verysimple/Phreeze/Controller.php

+ 11 - 12
phreeze/libs/verysimple/Phreeze/Controller.php

@@ -81,8 +81,6 @@ abstract class Controller
 
 
 		$this->_router = $router ? $router : new GenericRouter();
 		$this->_router = $router ? $router : new GenericRouter();
 
 
-		// commented out for testing because we do not need a session or a render engine
-		/*
 		if ($context)
 		if ($context)
 		{
 		{
 			$this->Context =& $context;
 			$this->Context =& $context;
@@ -93,17 +91,18 @@ abstract class Controller
 			$this->Context->GUID = "CTX_" . $this->GUID;
 			$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();
 		$this->Init();
 	}
 	}