diff --git a/libs/controller.php b/libs/controller.php index da5bc11a6..7f5ea2a0a 100644 --- a/libs/controller.php +++ b/libs/controller.php @@ -294,6 +294,7 @@ class Controller extends Object $view->parent =& $this->parent; $view->viewPath =& $this->viewPath; $view->params =& $this->params; + $view->data =& $this->data; foreach ($this->models as $key => $value) { diff --git a/libs/view.php b/libs/view.php index ade3bc2a9..604ccc6b2 100644 --- a/libs/view.php +++ b/libs/view.php @@ -155,7 +155,7 @@ class View extends Object var $hasRendered = null; var $modelsLoaded = false; - + function View(){ } @@ -210,9 +210,9 @@ class View extends Object // What is reason for these being the same? if (isset($this->hasRendered) && $this->hasRendered) { - //echo "
"; - //print_r($this); - //echo ""; + //echo "
"; + //print_r($this); + //echo ""; return true; } else @@ -474,13 +474,16 @@ class View extends Object require_once $helperFn; if(class_exists($helperCn)===true); { - ${$helper} = new $helperCn; - ${$helper}->base = $this->base; - ${$helper}->here = $this->here; - ${$helper}->params = $this->params; - ${$helper}->action = $this->action; - //${$helper}->data = $this->data; - //${$helper}->validationErrors = $this->validationErrors; + ${$helper} = new $helperCn; + ${$helper}->base = $this->base; + ${$helper}->here = $this->here; + ${$helper}->params = $this->params; + ${$helper}->action = $this->action; + ${$helper}->data = $this->data; + if(!empty($this->validationErrors)) + { + ${$helper}->validationErrors = $this->validationErrors; + } } } }