mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merged fixes from [3906]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3907 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
3180035f0f
commit
b76c2179e1
2 changed files with 9 additions and 2 deletions
|
@ -298,6 +298,7 @@ class Controller extends Object {
|
|||
|
||||
if ($this->persistModel === true){
|
||||
loadModels();
|
||||
uses('neat_array');
|
||||
} elseif($this->uses === false) {
|
||||
loadModel($this->modelClass);
|
||||
}
|
||||
|
@ -335,7 +336,10 @@ class Controller extends Object {
|
|||
$cached = false;
|
||||
$object = null;
|
||||
$modelKey = Inflector::underscore($modelClass);
|
||||
loadModel($modelClass);
|
||||
|
||||
if(!class_exists($modelClass)){
|
||||
loadModel($modelClass);
|
||||
}
|
||||
|
||||
if (class_exists($modelClass)) {
|
||||
if ($this->persistModel === true) {
|
||||
|
|
|
@ -570,7 +570,10 @@ class Model extends Overloadable {
|
|||
*/
|
||||
function __constructLinkedModel($assoc, $className, $id = false, $table = null, $ds = null) {
|
||||
$colKey = Inflector::underscore($className);
|
||||
loadModel($className);
|
||||
|
||||
if(!class_exists($className)){
|
||||
loadModel($className);
|
||||
}
|
||||
|
||||
if (ClassRegistry::isKeySet($colKey)) {
|
||||
if (!PHP5) {
|
||||
|
|
Loading…
Add table
Reference in a new issue