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){
|
if ($this->persistModel === true){
|
||||||
loadModels();
|
loadModels();
|
||||||
|
uses('neat_array');
|
||||||
} elseif($this->uses === false) {
|
} elseif($this->uses === false) {
|
||||||
loadModel($this->modelClass);
|
loadModel($this->modelClass);
|
||||||
}
|
}
|
||||||
|
@ -335,7 +336,10 @@ class Controller extends Object {
|
||||||
$cached = false;
|
$cached = false;
|
||||||
$object = null;
|
$object = null;
|
||||||
$modelKey = Inflector::underscore($modelClass);
|
$modelKey = Inflector::underscore($modelClass);
|
||||||
|
|
||||||
|
if(!class_exists($modelClass)){
|
||||||
loadModel($modelClass);
|
loadModel($modelClass);
|
||||||
|
}
|
||||||
|
|
||||||
if (class_exists($modelClass)) {
|
if (class_exists($modelClass)) {
|
||||||
if ($this->persistModel === true) {
|
if ($this->persistModel === true) {
|
||||||
|
|
|
@ -570,7 +570,10 @@ class Model extends Overloadable {
|
||||||
*/
|
*/
|
||||||
function __constructLinkedModel($assoc, $className, $id = false, $table = null, $ds = null) {
|
function __constructLinkedModel($assoc, $className, $id = false, $table = null, $ds = null) {
|
||||||
$colKey = Inflector::underscore($className);
|
$colKey = Inflector::underscore($className);
|
||||||
|
|
||||||
|
if(!class_exists($className)){
|
||||||
loadModel($className);
|
loadModel($className);
|
||||||
|
}
|
||||||
|
|
||||||
if (ClassRegistry::isKeySet($colKey)) {
|
if (ClassRegistry::isKeySet($colKey)) {
|
||||||
if (!PHP5) {
|
if (!PHP5) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue