Adding missing reference operators in Controller::paginate().

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8277 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2009-08-03 17:55:16 +00:00
parent 29dd4ddf03
commit 401796e1a9

View file

@ -947,17 +947,17 @@ class Controller extends Object {
}
if ($assoc && isset($this->{$object}->{$assoc})) {
$object = $this->{$object}->{$assoc};
$object =& $this->{$object}->{$assoc};
} elseif ($assoc && isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$assoc})) {
$object = $this->{$this->modelClass}->{$assoc};
$object =& $this->{$this->modelClass}->{$assoc};
} elseif (isset($this->{$object})) {
$object = $this->{$object};
$object =& $this->{$object};
} elseif (isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$object})) {
$object = $this->{$this->modelClass}->{$object};
$object =& $this->{$this->modelClass}->{$object};
}
} elseif (empty($object) || $object === null) {
if (isset($this->{$this->modelClass})) {
$object = $this->{$this->modelClass};
$object =& $this->{$this->modelClass};
} else {
$className = null;
$name = $this->uses[0];
@ -965,9 +965,9 @@ class Controller extends Object {
list($name, $className) = explode('.', $this->uses[0]);
}
if ($className) {
$object = $this->{$className};
$object =& $this->{$className};
} else {
$object = $this->{$name};
$object =& $this->{$name};
}
}
}