mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 12:02:41 +00:00
Merge branch '1.3' into 2.0
Conflicts: cake/console/templates/default/actions/controller_actions.ctp cake/console/templates/default/views/form.ctp cake/console/templates/default/views/index.ctp cake/console/templates/default/views/view.ctp cake/libs/controller/controller.php cake/libs/controller/scaffold.php cake/libs/view/pages/home.ctp cake/tests/cases/dispatcher.test.php cake/tests/cases/libs/model/cake_schema.test.php
This commit is contained in:
commit
adf604a966
32 changed files with 364 additions and 118 deletions
|
@ -604,7 +604,8 @@ class Controller extends Object {
|
|||
*
|
||||
* @param string $modelClass Name of model class to load
|
||||
* @param mixed $id Initial ID the instanced model class should have
|
||||
* @return mixed true when single model found and instance created error returned if models not found.
|
||||
* @return mixed true when single model found and instance created, error returned if model not found.
|
||||
* @access public
|
||||
*/
|
||||
public function loadModel($modelClass = null, $id = null) {
|
||||
if ($modelClass === null) {
|
||||
|
@ -653,6 +654,8 @@ class Controller extends Object {
|
|||
$this->_persist($modelClass, true, $object);
|
||||
$this->modelNames[] = $modelClass;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -729,7 +732,7 @@ class Controller extends Object {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convenience and object wrapper method for header(). Useful when doing tests and
|
||||
* Convenience and object wrapper method for header(). Useful when doing tests and
|
||||
* asserting that particular headers have been set.
|
||||
*
|
||||
* @param string $status The header message that is being set.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue