// Fix Bug on admin login - errors messages was twice printed
This commit is contained in:
@@ -29,19 +29,19 @@
|
|||||||
{$conf}
|
{$conf}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{if count($errors) && (!isset($disableDefaultErrorOutPut) || $disableDefaultErrorOutPut == false)} {* @todo what is ??? AND $this->_includeContainer *}
|
||||||
{if count($errors)} {* @todo what is ??? AND $this->_includeContainer *}
|
|
||||||
<div class="error">
|
<div class="error">
|
||||||
<span style="float:right">
|
<span style="float:right">
|
||||||
<a id="hideError" href="#"><img alt="X" src="../img/admin/close.png" /></a>
|
<a id="hideError" href="#"><img alt="X" src="../img/admin/close.png" /></a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{if count($errors) == 1}
|
{if count($errors) == 1}
|
||||||
{$errors[0]}
|
{$errors[0]}
|
||||||
{else}
|
{else}
|
||||||
{$errors|count} {l s='errors'}
|
{$errors|count} {l s='errors'}
|
||||||
<br/>
|
<br/>
|
||||||
<ol>
|
<ol>
|
||||||
{foreach $errors AS $error}
|
{foreach $errors as $error}
|
||||||
<li>{$error}</li>
|
<li>{$error}</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class AdminLoginControllerCore extends AdminController
|
|||||||
$clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'), explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
|
$clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'), explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
|
||||||
// If ssl is enabled, https protocol is required. Exception for maintenance and local (127.0.0.1) IP
|
// If ssl is enabled, https protocol is required. Exception for maintenance and local (127.0.0.1) IP
|
||||||
if ($clientIsMaintenanceOrLocal)
|
if ($clientIsMaintenanceOrLocal)
|
||||||
$this->errors = Tools::displayError('SSL is activated. However, your IP is allowed to use unsecure mode (Maintenance or local IP).');
|
$this->errors[] = Tools::displayError('SSL is activated. However, your IP is allowed to use unsecure mode (Maintenance or local IP).');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$warningSslMessage = Tools::displayError('SSL is activated. Please connect using the following url to log in in secure mode (https).');
|
$warningSslMessage = Tools::displayError('SSL is activated. Please connect using the following url to log in in secure mode (https).');
|
||||||
@@ -83,7 +83,8 @@ class AdminLoginControllerCore extends AdminController
|
|||||||
array(
|
array(
|
||||||
'errors' => $this->errors,
|
'errors' => $this->errors,
|
||||||
'nbErrors' => $nbErrors,
|
'nbErrors' => $nbErrors,
|
||||||
'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME'))
|
'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')),
|
||||||
|
'disableDefaultErrorOutPut' => true,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->setMedia();
|
$this->setMedia();
|
||||||
|
|||||||
Reference in New Issue
Block a user