// small fix for some order by on listing
This commit is contained in:
1 parent
f1ea9ba5b4
commit
eb14e25e2a
1 file changed
+4
-2
@@ -2189,8 +2189,10 @@ class AdminControllerCore extends Controller
|
|||||||
if (preg_match('/[.!]/', $order_by))
|
if (preg_match('/[.!]/', $order_by))
|
||||||
{
|
{
|
||||||
$order_by_split = preg_split('/[.!]/', $order_by);
|
$order_by_split = preg_split('/[.!]/', $order_by);
|
||||||
$order_by = pSQL($order_by_split[0]).'.`'.pSQL($order_by_split[1]).'`';
|
$order_by = bqSQL($order_by_split[0]).'.`'.bqSQL($order_by_split[1]).'`';
|
||||||
}
|
}
|
||||||
|
elseif ($order_by)
|
||||||
|
$order_by = '`'.bqSQL($order_by).'`';
|
||||||
|
|
||||||
$this->_orderWay = Tools::strtoupper($order_way);
|
$this->_orderWay = Tools::strtoupper($order_way);
|
||||||
|
|
||||||
@@ -2284,7 +2286,7 @@ class AdminControllerCore extends Controller
|
|||||||
(isset($this->_filter) ? $this->_filter : '').$where_shop.'
|
(isset($this->_filter) ? $this->_filter : '').$where_shop.'
|
||||||
'.(isset($this->_group) ? $this->_group.' ' : '').'
|
'.(isset($this->_group) ? $this->_group.' ' : '').'
|
||||||
'.$having_clause.'
|
'.$having_clause.'
|
||||||
ORDER BY '.(($order_by == $this->identifier) ? 'a.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way).
|
ORDER BY '.(($order_by == $this->identifier) ? 'a.' : '').$order_by.' '.pSQL($order_way).
|
||||||
($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '').
|
($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '').
|
||||||
(($use_limit === true) ? ' LIMIT '.(int)$start.','.(int)$limit : '');
|
(($use_limit === true) ? ' LIMIT '.(int)$start.','.(int)$limit : '');
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user