diff options
author | Felipe Figueroa <amenadiel@gmail.com> | 2018-05-22 19:05:51 +0300 |
---|---|---|
committer | Felipe Figueroa <amenadiel@gmail.com> | 2018-05-22 19:05:51 +0300 |
commit | 2551b1212b21fa61af8f7e01fa325564261c402c (patch) | |
tree | 734b07d359188094fe9d5ea08bc36140a9150e3e /src/controllers/RolesController.php | |
parent | 8bbd9aa2223914275ffedb7216c01af693cbf88d (diff) |
scrutinizer fixes
Diffstat (limited to 'src/controllers/RolesController.php')
-rw-r--r-- | src/controllers/RolesController.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/controllers/RolesController.php b/src/controllers/RolesController.php index 9e64c222..43ed5ff6 100644 --- a/src/controllers/RolesController.php +++ b/src/controllers/RolesController.php @@ -117,7 +117,7 @@ class RolesController extends BaseController 'role' => [ 'title' => $this->lang['strrole'], 'field' => Decorator::field('rolname'), - 'url' => \SUBFOLDER."/redirect/role?action=properties&{$this->misc->href}&", + 'url' => \SUBFOLDER . "/redirect/role?action=properties&{$this->misc->href}&", 'vars' => ['rolename' => 'rolname'], ], 'superuser' => [ @@ -237,7 +237,7 @@ class RolesController extends BaseController $this->printTitle($this->lang['strcreaterole'], 'pg.role.create'); $this->printMsg($msg); - echo '<form action="'.\SUBFOLDER."/src/views/roles\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/roles\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$this->lang['strname']}</th>\n"; echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>\n"; @@ -409,10 +409,10 @@ class RolesController extends BaseController $_POST['formPassword'] = ''; } - echo '<form action="'.\SUBFOLDER."/src/views/roles\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/roles\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$this->lang['strname']}</th>\n"; - echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"".htmlspecialchars($_POST['formNewRoleName']).'" />' : $this->misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n"; + echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . '" />' : $this->misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n"; echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['strpassword']}</th>\n"; echo "\t\t<td class=\"data1\"><input type=\"password\" size=\"15\" name=\"formPassword\" value=\"", htmlspecialchars($_POST['formPassword']), "\" /></td>\n\t</tr>\n"; echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['strconfirm']}</th>\n"; @@ -584,7 +584,7 @@ class RolesController extends BaseController echo '<p>', sprintf($this->lang['strconfdroprole'], $this->misc->printVal($_REQUEST['rolename'])), "</p>\n"; - echo '<form action="'.\SUBFOLDER."/src/views/roles\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/roles\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; echo '<input type="hidden" name="rolename" value="', htmlspecialchars($_REQUEST['rolename']), "\" />\n"; echo $this->misc->form; @@ -806,7 +806,7 @@ class RolesController extends BaseController $this->coalesceArr($_POST, 'confirm', ''); - echo '<form action="'.\SUBFOLDER."/src/views/roles\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/roles\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strpassword']}</th>\n"; echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"", @@ -823,10 +823,8 @@ class RolesController extends BaseController // Check that password is minimum length if (strlen($_POST['password']) < $this->conf['min_password_length']) { $this->doChangePassword(true, $this->lang['strpasswordshort']); - } - - // Check that password matches confirmation password - elseif ($_POST['password'] != $_POST['confirm']) { + } elseif ($_POST['password'] != $_POST['confirm']) { + // Check that password matches confirmation password $this->doChangePassword(true, $this->lang['strpasswordconfirm']); } else { $status = $data->changePassword($server_info['username'], $_POST['password']); |