fix for generateList

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4065 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2006-12-04 06:59:56 +00:00
parent 426bf45f98
commit ecb2b8c786

View file

@ -1610,6 +1610,10 @@ class Model extends Overloadable {
}
$result = $this->findAll($conditions, $fields, $order, $limit);
$this->recursive = $recursive;
if(!$result) {
return false;
}
if ($keyPath == null) {
$keyPath = '{n}.' . $this->name . '.' . $this->primaryKey;
@ -1630,6 +1634,9 @@ class Model extends Overloadable {
if (!empty($group)) {
$c = count($keys);
for ($i = 0; $i < $c; $i++) {
if(!isset($group[$i])) {
$group[$i] = 0;
}
if (!isset($out[$group[$i]])) {
$out[$group[$i]] = array();
}