Skip to content

Commit

Permalink
Convertig old-style find call to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 11, 2009
1 parent 00c0bb4 commit f7a113d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cake/libs/model/model.php
Expand Up @@ -1121,7 +1121,8 @@ function field($name, $conditions = null, $order = null) {
} else {
$recursive = $this->recursive;
}
if ($data = $this->find($conditions, $name, $order, $recursive)) {
$fields = $name;
if ($data = $this->find('first',compact('conditions','fields','order','recursive'))) {
if (strpos($name, '.') === false) {
if (isset($data[$this->alias][$name])) {
return $data[$this->alias][$name];
Expand Down

0 comments on commit f7a113d

Please sign in to comment.