From a95a8c0a61a9c2d13f0d16ed4f748b6d51b37588 Mon Sep 17 00:00:00 2001 From: phpnut Date: Tue, 11 Apr 2006 15:55:53 +0000 Subject: [PATCH] Merging fixes and enhancements into trunk. Revision: [2478] Merging differences between model_php4.php and model_php5.php git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2479 3807eeeb-6ff5-0310-8944-8be069107fe0 --- VERSION.txt | 2 +- cake/libs/model/model_php4.php | 9 +++++++++ cake/libs/model/model_php5.php | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index d4074519c..2ef7efb85 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -1.0.0.2477 \ No newline at end of file +1.0.0.2479 \ No newline at end of file diff --git a/cake/libs/model/model_php4.php b/cake/libs/model/model_php4.php index b34b3a504..4c00152ec 100644 --- a/cake/libs/model/model_php4.php +++ b/cake/libs/model/model_php4.php @@ -1215,6 +1215,15 @@ class Model extends Object $limit_str = $db->limit($limit, $offset); } + if ($order == null) + { + $order = array(); + } + else + { + $order = array($order); + } + $queryData = array( 'conditions' => $conditions, 'fields' => $fields, diff --git a/cake/libs/model/model_php5.php b/cake/libs/model/model_php5.php index c4140aaf9..4f2ea373d 100644 --- a/cake/libs/model/model_php5.php +++ b/cake/libs/model/model_php5.php @@ -1494,7 +1494,8 @@ class Model extends Object } /** - * Returns a resultset array with specified fields from database matching given conditions. Method can be used to generate option lists for SELECT elements. + * Returns a resultset array with specified fields from database matching given conditions. + * Method can be used to generate option lists for SELECT elements. * * @param mixed $conditions SQL conditions as a string or as an array('field'=>'value',...) * @param string $order SQL ORDER BY conditions (e.g. "price DESC" or "name ASC")