// clean code

This commit is contained in:
aFolletete
2012-05-03 13:50:34 +00:00
parent c63dfb8fe1
commit 4635eed37d
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -82,11 +82,11 @@ class AdminLoginControllerCore extends AdminController
$tab = new Tab((int)$this->context->employee->default_tab);
$this->context->smarty->assign('redirect', $this->context->link->getAdminLink($tab->class_name));
}
if ($nbErrors = count($this->errors))
if ($nb_errors = count($this->errors))
$this->context->smarty->assign(array(
'errors' => $this->errors,
'nbErrors' => $nbErrors,
'nbErrors' => $nb_errors,
'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')),
'disableDefaultErrorOutPut' => true,
));
@@ -187,7 +187,8 @@ class AdminLoginControllerCore extends AdminController
if (!$employee->getByemail($email) || !$employee)
$this->errors[] = Tools::displayError('This account does not exist');
elseif ((strtotime($employee->last_passwd_gen.'+'.Configuration::get('PS_PASSWD_TIME_BACK').' minutes') - time()) > 0)
$this->errors[] = Tools::displayError('You can regenerate your password only every').' '.Configuration::get('PS_PASSWD_TIME_BACK').' '.Tools::displayError('minute(s)');
$this->errors[] = Tools::displayError('You can regenerate your password only every').' '.
Configuration::get('PS_PASSWD_TIME_BACK').' '.Tools::displayError('minute(s)');
}
if (_PS_MODE_DEMO_)
$errors[] = Tools::displayError('This functionality has been disabled.');
@@ -40,4 +40,4 @@
<p class="logout"><a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Sign out' mod='blockmyaccountfooter'}">{l s='Sign out' mod='blockmyaccount'}</a></p>
</div>
</div>
<!-- /Block myaccount module -->
<!-- /Block myaccount module -->