From 193959ebf362f4cbd299e53a078c28a9e8a969aa Mon Sep 17 00:00:00 2001 From: gwoo Date: Tue, 17 Jun 2008 15:43:08 +0000 Subject: [PATCH] closes #3901 unnecessary setting of path in App::__settings, closes #4115 DboSource::fetchAll() does not need resultSet for every row git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7205 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/configure.php | 4 +--- cake/libs/model/datasources/dbo_source.php | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cake/libs/configure.php b/cake/libs/configure.php index b89007e14..b41bd71f0 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -1042,11 +1042,9 @@ class App extends Object { if ($plugin) { $plugin = Inflector::underscore($plugin); $name = Inflector::camelize($plugin); - $path = $plugin . DS; - } - $load = strtolower($type); $path = null; + $load = strtolower($type); switch ($load) { case 'model': diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index d87fa1ef1..c7cc0773b 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -338,7 +338,11 @@ class DboSource extends DataSource { if ($this->execute($sql)) { $out = array(); - while ($item = $this->fetchRow()) { + $first = $this->fetchRow(); + if ($first != null){ + $out[] = $first; + } + while (is_resource($this->_result) && $item = $this->fetchResult()) { $out[] = $item; }