From f7a113d2b0354eac60e5acf95c9a7f238f231439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Wed, 11 Nov 2009 23:43:37 -0430 Subject: [PATCH] Convertig old-style find call to new api --- cake/libs/model/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 726f628db..127ace058 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1121,7 +1121,8 @@ class Model extends Overloadable { } 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];