// 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
+4 -3
View File
@@ -83,10 +83,10 @@ class AdminLoginControllerCore extends AdminController
$this->context->smarty->assign('redirect', $this->context->link->getAdminLink($tab->class_name)); $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( $this->context->smarty->assign(array(
'errors' => $this->errors, 'errors' => $this->errors,
'nbErrors' => $nbErrors, 'nbErrors' => $nb_errors,
'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')), 'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')),
'disableDefaultErrorOutPut' => true, 'disableDefaultErrorOutPut' => true,
)); ));
@@ -187,7 +187,8 @@ class AdminLoginControllerCore extends AdminController
if (!$employee->getByemail($email) || !$employee) if (!$employee->getByemail($email) || !$employee)
$this->errors[] = Tools::displayError('This account does not exist'); $this->errors[] = Tools::displayError('This account does not exist');
elseif ((strtotime($employee->last_passwd_gen.'+'.Configuration::get('PS_PASSWD_TIME_BACK').' minutes') - time()) > 0) 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_) if (_PS_MODE_DEMO_)
$errors[] = Tools::displayError('This functionality has been disabled.'); $errors[] = Tools::displayError('This functionality has been disabled.');