// Merge -> revision 9435
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9438 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+6
-4
@@ -1764,8 +1764,12 @@ FileETag INode MTime Size
|
||||
switch ($type)
|
||||
{
|
||||
case 'by' :
|
||||
$list = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity');
|
||||
$value = (is_null($value) || $value === false || $value === '') ? (int)Configuration::get('PS_PRODUCTS_ORDER_BY') : $value;
|
||||
$value = (isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'position');
|
||||
$orderByPrefix = '';
|
||||
if($prefix) {
|
||||
if ($prefix)
|
||||
{
|
||||
if ($value == 'id_product' || $value == 'date_add' || $value == 'price')
|
||||
$orderByPrefix = 'p.';
|
||||
elseif ($value == 'name')
|
||||
@@ -1776,9 +1780,7 @@ FileETag INode MTime Size
|
||||
$orderByPrefix = 'cp.';
|
||||
}
|
||||
|
||||
$value = (is_null($value) || $value === false || $value === '') ? (int)Configuration::get('PS_PRODUCTS_ORDER_BY') : $value;
|
||||
$list = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity');
|
||||
return $orderByPrefix.((isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'position'));
|
||||
return $orderByPrefix.$value;
|
||||
break;
|
||||
|
||||
case 'way' :
|
||||
|
||||
Reference in New Issue
Block a user