Permalink
Browse files

Fake commit

  • Loading branch information...
1 parent 2503632 commit 285329e7a411e0f45b4a3d41982e430c5ef61f9f @lorenzo lorenzo committed Nov 17, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/libs/model/datasources/dbo_source.php
@@ -1350,7 +1350,7 @@ function buildJoinStatement($join) {
* @return string An executable SQL statement
* @see DboSource::renderStatement()
*/
- function buildStatement($query, $model) {
+ function buildStatement($query, &$model) {
$query = array_merge(array('offset' => null, 'joins' => array()), $query);
if (!empty($query['joins'])) {
$count = count($query['joins']);
@@ -1365,7 +1365,7 @@ function buildStatement($query, $model) {
'fields' => implode(', ', $query['fields']),
'table' => $query['table'],
'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']),
'joins' => implode(' ', $query['joins']),
'group' => $this->group($query['group'])
@@ -2177,7 +2177,7 @@ function limit($limit, $offset = null) {
* @param string $direction Direction (ASC or DESC)
* @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)) {
$keys = array_map('trim', explode(',', $keys));
}

0 comments on commit 285329e

Please sign in to comment.