Refactoring schema test and fixing formatting, refactoring Model::_findCount() to use DboSource::calculate() in all cases, closes #4501

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7684 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-10-01 15:27:29 +00:00
parent 1a0299d257
commit 2bfd5a4b3e
5 changed files with 83 additions and 48 deletions

View file

@ -390,6 +390,9 @@ class DboSource extends DataSource {
if ($data == '*') {
return '*';
}
if (is_object($data) && isset($data->type)) {
return $data->value;
}
$array = is_array($data);
$data = (array)$data;
$count = count($data);