mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merging revisions:
Revision: [1700] Fixed loadController() to return true if the controller is already loaded. Fixed validation errors messages that where not showing. Revision: [1699] Fixed missingView error git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1701 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5193402736
commit
1867e6503a
4 changed files with 11 additions and 4 deletions
|
@ -6,4 +6,4 @@
|
||||||
// +---------------------------------------------------------------------------------------------------+ //
|
// +---------------------------------------------------------------------------------------------------+ //
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
0.10.4.1697_beta
|
0.10.4.1701_beta
|
|
@ -169,6 +169,10 @@ function loadController ($name)
|
||||||
}
|
}
|
||||||
return file_exists($controller_fn)? require_once($controller_fn): false;
|
return file_exists($controller_fn)? require_once($controller_fn): false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -348,7 +348,10 @@ class Controller extends Object
|
||||||
function validateErrors ()
|
function validateErrors ()
|
||||||
{
|
{
|
||||||
$objects = func_get_args();
|
$objects = func_get_args();
|
||||||
if (!count($objects)) return false;
|
if (!count($objects))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
foreach ($objects as $object)
|
foreach ($objects as $object)
|
||||||
|
@ -383,7 +386,7 @@ class Controller extends Object
|
||||||
{
|
{
|
||||||
if(!empty($this->{$model}->validationErrors))
|
if(!empty($this->{$model}->validationErrors))
|
||||||
{
|
{
|
||||||
$view->validationErrors[$model] =& $this->{$model}->validationErrors;
|
$this->_viewClass->validationErrors[$model] =& $this->{$model}->validationErrors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@ class View extends Object
|
||||||
$controller = $this;
|
$controller = $this;
|
||||||
$controller->missingView = $viewFileName;
|
$controller->missingView = $viewFileName;
|
||||||
$controller->action = $action;
|
$controller->action = $action;
|
||||||
call_user_func_array(array('View', 'missingView'), empty($params['pass'])? null: $params['pass']);
|
call_user_func_array(array(&$controller, 'missingView'), empty($params['pass'])? null: $params['pass']);
|
||||||
$isFatal = isset($this->isFatal) ? $this->isFatal : false;
|
$isFatal = isset($this->isFatal) ? $this->isFatal : false;
|
||||||
if (!$isFatal)
|
if (!$isFatal)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue