mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Fake commit
This commit is contained in:
parent
2503632327
commit
285329e7a4
1 changed files with 3 additions and 3 deletions
|
@ -1350,7 +1350,7 @@ class DboSource extends DataSource {
|
||||||
* @return string An executable SQL statement
|
* @return string An executable SQL statement
|
||||||
* @see DboSource::renderStatement()
|
* @see DboSource::renderStatement()
|
||||||
*/
|
*/
|
||||||
function buildStatement($query, $model) {
|
function buildStatement($query, &$model) {
|
||||||
$query = array_merge(array('offset' => null, 'joins' => array()), $query);
|
$query = array_merge(array('offset' => null, 'joins' => array()), $query);
|
||||||
if (!empty($query['joins'])) {
|
if (!empty($query['joins'])) {
|
||||||
$count = count($query['joins']);
|
$count = count($query['joins']);
|
||||||
|
@ -1365,7 +1365,7 @@ class DboSource extends DataSource {
|
||||||
'fields' => implode(', ', $query['fields']),
|
'fields' => implode(', ', $query['fields']),
|
||||||
'table' => $query['table'],
|
'table' => $query['table'],
|
||||||
'alias' => $this->alias . $this->name($query['alias']),
|
'alias' => $this->alias . $this->name($query['alias']),
|
||||||
'order' => $this->order($query['order']),
|
'order' => $this->order($query['order'],'ASC',$model),
|
||||||
'limit' => $this->limit($query['limit'], $query['offset']),
|
'limit' => $this->limit($query['limit'], $query['offset']),
|
||||||
'joins' => implode(' ', $query['joins']),
|
'joins' => implode(' ', $query['joins']),
|
||||||
'group' => $this->group($query['group'])
|
'group' => $this->group($query['group'])
|
||||||
|
@ -2177,7 +2177,7 @@ class DboSource extends DataSource {
|
||||||
* @param string $direction Direction (ASC or DESC)
|
* @param string $direction Direction (ASC or DESC)
|
||||||
* @return string ORDER BY clause
|
* @return string ORDER BY clause
|
||||||
*/
|
*/
|
||||||
function order($keys, $direction = 'ASC') {
|
function order($keys, $direction = 'ASC', &$model = null) {
|
||||||
if (is_string($keys) && strpos($keys, ',') && !preg_match('/\(.+\,.+\)/', $keys)) {
|
if (is_string($keys) && strpos($keys, ',') && !preg_match('/\(.+\,.+\)/', $keys)) {
|
||||||
$keys = array_map('trim', explode(',', $keys));
|
$keys = array_map('trim', explode(',', $keys));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue