Adding fix for Ticket #896

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3108 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-06-15 13:18:01 +00:00
parent ae3a8d0f9e
commit 14d5d8e979
2 changed files with 38 additions and 14 deletions

View file

@ -240,6 +240,13 @@ class Model extends Object{
*/
var $recursive = 1;
/**
* Default ordering of model records
*
* @var mixed
*/
var $order = null;
/**
* Default association keys
*
@ -1109,12 +1116,17 @@ class Model extends Object{
}
if ($order == null) {
if ($this->order == null) {
$order = array();
} else {
$order = array($this->order);
}
} else {
$order = array($order);
}
$queryData = array('conditions' => $conditions,
$queryData = array(
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit,

View file

@ -240,6 +240,13 @@ class Model extends Object{
*/
var $recursive = 1;
/**
* Default ordering of model records
*
* @var mixed
*/
var $order = null;
/**
* Default association keys
*
@ -1106,12 +1113,17 @@ class Model extends Object{
}
if ($order == null) {
if ($this->order == null) {
$order = array();
} else {
$order = array($this->order);
}
} else {
$order = array($order);
}
$queryData = array('conditions' => $conditions,
$queryData = array(
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit,