X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/fd3db1c1a2b975a23c907b2e9b714a0cfe47f3e0..a7ba11adfecf6cb906749efe5abce688363aef07:/admin_options.php?ds=inline diff --git a/admin_options.php b/admin_options.php index 2a44e3e2..b06af62d 100644 --- a/admin_options.php +++ b/admin_options.php @@ -36,7 +36,7 @@ if (!ttAccessCheck(right_administer_site)) { exit(); } -if ($request->getMethod() == 'POST') { +if ($request->isPost()) { $cl_password1 = $request->getParameter('password1'); $cl_password2 = $request->getParameter('password2'); } @@ -46,7 +46,7 @@ $form->addInput(array('type'=>'text','aspassword'=>true,'maxlength'=>'30','name' $form->addInput(array('type'=>'text','aspassword'=>true,'maxlength'=>'30','name'=>'password2','style'=>"width: 150px;",'value'=>$cl_password2)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit'))); -if ($request->getMethod() == 'POST') { +if ($request->isPost()) { if ($cl_password1 || $cl_password2) { // Validate user input. if (!ttValidString($cl_password1)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); @@ -55,7 +55,7 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); } - if ($errors->isEmpty() && $cl_password1) { + if ($errors->no() && $cl_password1) { if (ttUserHelper::setPassword($user->id, $cl_password1)) { header('Location: admin_teams.php'); exit();