[-] Bo : Admin login loop under Firefox

This commit is contained in:
Gregory Roussac
2013-04-29 21:54:26 +02:00
parent 8996690a65
commit 93d5016848
2 changed files with 6 additions and 5 deletions
+3 -1
View File
@@ -1760,7 +1760,9 @@ class AdminControllerCore extends Controller
$this->context->employee->logout();
if ($this->controller_name != 'AdminLogin' && (!isset($this->context->employee) || !$this->context->employee->isLoggedBack()))
Tools::redirectAdmin($this->context->link->getAdminLink('AdminLogin').(!isset($_GET['logout']) ? '&redirect='.$this->controller_name : ''));
{
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 : '');
+3 -4
View File
@@ -75,11 +75,10 @@ function doAjaxLogin(redirect) {
redirect: redirect
},
success: function(jsonData) {
if (jsonData.hasErrors) {
if (jsonData.hasErrors)
displayErrors(jsonData.errors);
} else {
window.location.href = jsonData.redirect;
}
else
window.location.assign(jsonData.redirect);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
$('#error').html('<h3>TECHNICAL ERROR:</h3><p>Details: Error thrown: ' + XMLHttpRequest + '</p><p>Text status: ' + textStatus + '</p>').show();