Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -2028,6 +2028,9 @@ class AdminControllerCore extends Controller
|
|||||||
|| !Validate::isUnsignedId($id_lang))
|
|| !Validate::isUnsignedId($id_lang))
|
||||||
throw new PrestaShopException('get list params is not valid');
|
throw new PrestaShopException('get list params is not valid');
|
||||||
|
|
||||||
|
if (isset($this->fields_list[$order_by]) && isset($this->fields_list[$order_by]['filter_key']))
|
||||||
|
$order_by = $this->fields_list[$order_by]['filter_key'];
|
||||||
|
|
||||||
/* Determine offset from current page */
|
/* Determine offset from current page */
|
||||||
if ((isset($_POST['submitFilter'.$this->table]) ||
|
if ((isset($_POST['submitFilter'.$this->table]) ||
|
||||||
isset($_POST['submitFilter'.$this->table.'_x']) ||
|
isset($_POST['submitFilter'.$this->table.'_x']) ||
|
||||||
@@ -2097,9 +2100,9 @@ class AdminControllerCore extends Controller
|
|||||||
$having_clause .= $this->_having.' ';
|
$having_clause .= $this->_having.' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($order_by, '.') > 0)
|
if (preg_match('/[.!]/', $order_by))
|
||||||
{
|
{
|
||||||
$order_by = explode('.', $order_by);
|
$order_by = preg_split('/[.!]/', $order_by);
|
||||||
$order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`';
|
$order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ class ProductControllerCore extends FrontController
|
|||||||
header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected));
|
header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected));
|
||||||
break;
|
break;
|
||||||
case '404':
|
case '404':
|
||||||
|
default:
|
||||||
header('HTTP/1.1 404 Not Found');
|
header('HTTP/1.1 404 Not Found');
|
||||||
header('Status: 404 Not Found');
|
header('Status: 404 Not Found');
|
||||||
$this->errors[] = Tools::displayError('Product is no longer available.');
|
$this->errors[] = Tools::displayError('Product is no longer available.');
|
||||||
|
|||||||
Reference in New Issue
Block a user