//MERGE branche release
This commit is contained in:
@@ -387,7 +387,7 @@ class AdminControllerCore extends Controller
|
||||
$filter = '';
|
||||
foreach ($this->fields_list AS $field => $t)
|
||||
{
|
||||
if ($val = Tools::getValue($this->table.'Filter_'.$field))
|
||||
if ($val = htmlspecialchars(Tools::getValue($this->table.'Filter_'.$field), ENT_QUOTES, 'UTF-8'))
|
||||
{
|
||||
if(!is_array($val) && !empty($val))
|
||||
$filter .= ($filter ? ', ' : $this->l(' filter by ')).$t['title'].' : ';
|
||||
@@ -1192,6 +1192,9 @@ class AdminControllerCore extends Controller
|
||||
|
||||
protected function filterToField($key, $filter)
|
||||
{
|
||||
if (!isset($this->fields_list))
|
||||
return false;
|
||||
|
||||
foreach ($this->fields_list as $field)
|
||||
if (array_key_exists('filter_key', $field) && $field['filter_key'] == $key)
|
||||
return $field;
|
||||
@@ -1813,7 +1816,11 @@ class AdminControllerCore extends Controller
|
||||
$this->context->employee->logout();
|
||||
|
||||
if ($this->controller_name != 'AdminLogin' && (!isset($this->context->employee) || !$this->context->employee->isLoggedBack()))
|
||||
{
|
||||
if (isset($this->context->employee))
|
||||
$this->context->employee->logout();
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminLogin').((!isset($_GET['logout']) && $this->controller_name != 'AdminNotFound') ? '&redirect='.$this->controller_name : ''));
|
||||
}
|
||||
|
||||
// Set current index
|
||||
$current_index = 'index.php'.(($controller = Tools::getValue('controller')) ? '?controller='.$controller : '');
|
||||
|
||||
@@ -116,16 +116,16 @@ class FrontControllerCore extends Controller
|
||||
|
||||
// If we call a SSL controller without SSL or a non SSL controller with SSL, we redirect with the right protocol
|
||||
if (Configuration::get('PS_SSL_ENABLED') && ($_SERVER['REQUEST_METHOD'] != 'POST') && $this->ssl != Tools::usingSecureMode())
|
||||
{
|
||||
{
|
||||
header('HTTP/1.1 301 Moved Permanently');
|
||||
header('Cache-Control: no-cache');
|
||||
if ($this->ssl)
|
||||
if ($this->ssl)
|
||||
header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
|
||||
else
|
||||
else
|
||||
header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']);
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ($this->ajax)
|
||||
{
|
||||
$this->display_header = false;
|
||||
@@ -333,7 +333,8 @@ class FrontControllerCore extends Controller
|
||||
'opc' => (bool)Configuration::get('PS_ORDER_PROCESS_TYPE'),
|
||||
'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE') || !(bool)Group::getCurrent()->show_prices,
|
||||
'b2b_enable' => (bool)Configuration::get('PS_B2B_ENABLE'),
|
||||
'request' => $link->getPaginationLink(false, false, false, true)
|
||||
'request' => $link->getPaginationLink(false, false, false, true),
|
||||
'PS_STOCK_MANAGEMENT' => Configuration::get('PS_STOCK_MANAGEMENT')
|
||||
));
|
||||
|
||||
// Add the tpl files directory for mobile
|
||||
@@ -593,7 +594,7 @@ class FrontControllerCore extends Controller
|
||||
|
||||
protected function canonicalRedirection($canonical_url = '')
|
||||
{
|
||||
if (!$canonical_url || !Configuration::get('PS_CANONICAL_REDIRECT') || strtoupper($_SERVER['REQUEST_METHOD']) != 'GET')
|
||||
if (!$canonical_url || !Configuration::get('PS_CANONICAL_REDIRECT') || strtoupper($_SERVER['REQUEST_METHOD']) != 'GET' || Tools::getValue('live_edit'))
|
||||
return;
|
||||
|
||||
$match_url = (($this->ssl && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
||||
@@ -1137,4 +1138,4 @@ class FrontControllerCore extends Controller
|
||||
'logo_url' => $logo
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user