mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46: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;
|
||||
|
||||
/**
|
||||
* Default ordering of model records
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
var $order = null;
|
||||
|
||||
/**
|
||||
* Default association keys
|
||||
*
|
||||
|
@ -1109,17 +1116,22 @@ class Model extends Object{
|
|||
}
|
||||
|
||||
if ($order == null) {
|
||||
$order = array();
|
||||
if ($this->order == null) {
|
||||
$order = array();
|
||||
} else {
|
||||
$order = array($this->order);
|
||||
}
|
||||
} else {
|
||||
$order = array($order);
|
||||
}
|
||||
|
||||
$queryData = array('conditions' => $conditions,
|
||||
'fields' => $fields,
|
||||
'joins' => array(),
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
'order' => $order
|
||||
$queryData = array(
|
||||
'conditions' => $conditions,
|
||||
'fields' => $fields,
|
||||
'joins' => array(),
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
'order' => $order
|
||||
);
|
||||
|
||||
if (!$this->beforeFind($queryData)) {
|
||||
|
|
|
@ -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,17 +1113,22 @@ class Model extends Object{
|
|||
}
|
||||
|
||||
if ($order == null) {
|
||||
$order = array();
|
||||
if ($this->order == null) {
|
||||
$order = array();
|
||||
} else {
|
||||
$order = array($this->order);
|
||||
}
|
||||
} else {
|
||||
$order = array($order);
|
||||
}
|
||||
|
||||
$queryData = array('conditions' => $conditions,
|
||||
'fields' => $fields,
|
||||
'joins' => array(),
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
'order' => $order
|
||||
$queryData = array(
|
||||
'conditions' => $conditions,
|
||||
'fields' => $fields,
|
||||
'joins' => array(),
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
'order' => $order
|
||||
);
|
||||
|
||||
if (!$this->beforeFind($queryData)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue