Fixed determination of a multi-part browser language such as pt-br.
[timetracker.git] / password_reset.php
index 9c2ed4e..216a81c 100644 (file)
@@ -46,7 +46,7 @@ if ($request->isPost()) {
   // Validate user input.
   if (!ttValidString($cl_login)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.login'));
 
-  if ($err->IsEmpty()) {
+  if ($err->no()) {
     if (!ttUserHelper::getUserByLogin($cl_login)) {
       // User with a specified login was not found.
       // In this case, if login looks like email, try finding user by email.
@@ -61,7 +61,7 @@ if ($request->isPost()) {
     }
   }
 
-  if ($err->IsEmpty()) {
+  if ($err->no()) {
     $user = new ttUser($cl_login); // Note: reusing $user from initialize.php here.
 
     // Prepare and save a temporary reference for user.
@@ -110,7 +110,7 @@ if ($request->isPost()) {
       $smarty->assign('result_message', $res ? $i18n->getKey('form.reset_password.message') : $i18n->getKey('error.mail_send'));
     }
   }
-} // POST
+} // isPost
 
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
 $smarty->assign('onload', 'onLoad="document.resetPasswordForm.login.focus()"');