From d13759522bd34d7ed2babdbb7ba5e6706db17e8c Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 4 Dec 2010 13:45:42 -0500 Subject: [PATCH] Removing strtolower() calls. You must now call model magic findBy and findAllBy using camelcase forms. --- cake/libs/model/datasources/dbo_source.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index a47ee4d74..010a66630 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -416,14 +416,14 @@ class DboSource extends DataSource { if (count($args) == 1) { return $this->fetchAll($args[0]); - } elseif (count($args) > 1 && (strpos(strtolower($args[0]), 'findby') === 0 || strpos(strtolower($args[0]), 'findallby') === 0)) { + } elseif (count($args) > 1 && (strpos($args[0], 'findBy') === 0 || strpos($args[0], 'findAllBy') === 0)) { $params = $args[1]; - if (strpos(strtolower($args[0]), 'findby') === 0) { - $all = false; + if (strpos($args[0], 'findBy') === 0) { + $all = false; $field = Inflector::underscore(preg_replace('/^findBy/i', '', $args[0])); } else { - $all = true; + $all = true; $field = Inflector::underscore(preg_replace('/^findAllBy/i', '', $args[0])); }