mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
ae3a8d0f9e
commit
14d5d8e979
2 changed files with 38 additions and 14 deletions
|
@ -240,6 +240,13 @@ class Model extends Object{
|
||||||
*/
|
*/
|
||||||
var $recursive = 1;
|
var $recursive = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default ordering of model records
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
var $order = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default association keys
|
* Default association keys
|
||||||
*
|
*
|
||||||
|
@ -1109,12 +1116,17 @@ class Model extends Object{
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($order == null) {
|
if ($order == null) {
|
||||||
|
if ($this->order == null) {
|
||||||
$order = array();
|
$order = array();
|
||||||
|
} else {
|
||||||
|
$order = array($this->order);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$order = array($order);
|
$order = array($order);
|
||||||
}
|
}
|
||||||
|
|
||||||
$queryData = array('conditions' => $conditions,
|
$queryData = array(
|
||||||
|
'conditions' => $conditions,
|
||||||
'fields' => $fields,
|
'fields' => $fields,
|
||||||
'joins' => array(),
|
'joins' => array(),
|
||||||
'limit' => $limit,
|
'limit' => $limit,
|
||||||
|
|
|
@ -240,6 +240,13 @@ class Model extends Object{
|
||||||
*/
|
*/
|
||||||
var $recursive = 1;
|
var $recursive = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default ordering of model records
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
var $order = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default association keys
|
* Default association keys
|
||||||
*
|
*
|
||||||
|
@ -1106,12 +1113,17 @@ class Model extends Object{
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($order == null) {
|
if ($order == null) {
|
||||||
|
if ($this->order == null) {
|
||||||
$order = array();
|
$order = array();
|
||||||
|
} else {
|
||||||
|
$order = array($this->order);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$order = array($order);
|
$order = array($order);
|
||||||
}
|
}
|
||||||
|
|
||||||
$queryData = array('conditions' => $conditions,
|
$queryData = array(
|
||||||
|
'conditions' => $conditions,
|
||||||
'fields' => $fields,
|
'fields' => $fields,
|
||||||
'joins' => array(),
|
'joins' => array(),
|
||||||
'limit' => $limit,
|
'limit' => $limit,
|
||||||
|
|
Loading…
Add table
Reference in a new issue