diff options
author | Felipe Figueroa <amenadiel@gmail.com> | 2018-06-08 00:59:03 +0300 |
---|---|---|
committer | Felipe Figueroa <amenadiel@gmail.com> | 2018-06-08 00:59:03 +0300 |
commit | 86d4dac391f1beca18d4b0c3ced41aa07554bbd6 (patch) | |
tree | 421a44bf6a0a33089ad30a074a75a7bfd28c369c /src/controllers/PrivilegesController.php | |
parent | 211bd7f9b8f41bc86d6c09e1cd08b5982ab2ae24 (diff) |
replace usage of "\n" with PHP_EOL
Diffstat (limited to 'src/controllers/PrivilegesController.php')
-rw-r--r-- | src/controllers/PrivilegesController.php | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php index 56387329..a5599982 100644 --- a/src/controllers/PrivilegesController.php +++ b/src/controllers/PrivilegesController.php @@ -95,7 +95,7 @@ class PrivilegesController extends BaseController } if (sizeof($privileges) > 0) { - echo "<table>\n"; + echo '<table>'.PHP_EOL; if ($data->hasRoles()) { echo "<tr><th class=\"data\">{$this->lang['strrole']}</th>"; } else { @@ -108,23 +108,23 @@ class PrivilegesController extends BaseController continue; } - echo "<th class=\"data\">{$v2}</th>\n"; + echo "<th class=\"data\">{$v2}</th>".PHP_EOL; } if ($data->hasGrantOption()) { echo "<th class=\"data\">{$this->lang['strgrantor']}</th>"; } - echo "</tr>\n"; + echo '</tr>'.PHP_EOL; // Loop over privileges, outputting them $i = 0; foreach ($privileges as $v) { $id = (0 == ($i % 2) ? '1' : '2'); - echo "<tr class=\"data{$id}\">\n"; + echo "<tr class=\"data{$id}\">".PHP_EOL; if (!$data->hasRoles()) { - echo '<td>', $this->misc->printVal($v[0]), "</td>\n"; + echo '<td>', $this->misc->printVal($v[0]), '</td>'.PHP_EOL; } - echo '<td>', $this->misc->printVal($v[1]), "</td>\n"; + echo '<td>', $this->misc->printVal($v[1]), '</td>'.PHP_EOL; foreach ($data->privlist[$subject] as $v2) { // Skip over ALL PRIVILEGES if ('ALL PRIVILEGES' == $v2) { @@ -143,18 +143,18 @@ class PrivilegesController extends BaseController echo $this->lang['strasterisk']; } - echo "</td>\n"; + echo '</td>'.PHP_EOL; } if ($data->hasGrantOption()) { - echo '<td>', $this->misc->printVal($v[3]), "</td>\n"; + echo '<td>', $this->misc->printVal($v[3]), '</td>'.PHP_EOL; } - echo "</tr>\n"; + echo '</tr>'.PHP_EOL; ++$i; } echo '</table>'; } else { - echo "<p>{$this->lang['strnoprivileges']}</p>\n"; + echo "<p>{$this->lang['strnoprivileges']}</p>".PHP_EOL; } $this->printGrantLinks(); } @@ -303,77 +303,77 @@ class PrivilegesController extends BaseController $this->printMsg($msg); - echo '<form action="'.\SUBFOLDER."/src/views/privileges\" method=\"post\">\n"; - echo "<table>\n"; - echo "<tr><th class=\"data left\">{$this->lang['strusers']}</th>\n"; - echo '<td class="data1"><select name="username[]" multiple="multiple" size="', min(6, $users->recordCount()), "\">\n"; + echo '<form action="'.\SUBFOLDER.'/src/views/privileges" method="post">'.PHP_EOL; + echo '<table>'.PHP_EOL; + echo "<tr><th class=\"data left\">{$this->lang['strusers']}</th>".PHP_EOL; + echo '<td class="data1"><select name="username[]" multiple="multiple" size="', min(6, $users->recordCount()), '">'.PHP_EOL; while (!$users->EOF) { $uname = htmlspecialchars($users->fields['usename']); echo "<option value=\"{$uname}\"", - in_array($users->fields['usename'], $_REQUEST['username'], true) ? ' selected="selected"' : '', ">{$uname}</option>\n"; + in_array($users->fields['usename'], $_REQUEST['username'], true) ? ' selected="selected"' : '', ">{$uname}</option>".PHP_EOL; $users->moveNext(); } - echo "</select></td></tr>\n"; - echo "<tr><th class=\"data left\">{$this->lang['strgroups']}</th>\n"; - echo "<td class=\"data1\">\n"; - echo '<input type="checkbox" id="public" name="public"', (isset($_REQUEST['public']) ? ' checked="checked"' : ''), " /><label for=\"public\">PUBLIC</label>\n"; + echo '</select></td></tr>'.PHP_EOL; + echo "<tr><th class=\"data left\">{$this->lang['strgroups']}</th>".PHP_EOL; + echo '<td class="data1">'.PHP_EOL; + echo '<input type="checkbox" id="public" name="public"', (isset($_REQUEST['public']) ? ' checked="checked"' : ''), ' /><label for="public">PUBLIC</label>'.PHP_EOL; // Only show groups if there are groups! if ($groups->recordCount() > 0) { - echo '<br /><select name="groupname[]" multiple="multiple" size="', min(6, $groups->recordCount()), "\">\n"; + echo '<br /><select name="groupname[]" multiple="multiple" size="', min(6, $groups->recordCount()), '">'.PHP_EOL; while (!$groups->EOF) { $gname = htmlspecialchars($groups->fields['groname']); echo "<option value=\"{$gname}\"", - in_array($groups->fields['groname'], $_REQUEST['groupname'], true) ? ' selected="selected"' : '', ">{$gname}</option>\n"; + in_array($groups->fields['groname'], $_REQUEST['groupname'], true) ? ' selected="selected"' : '', ">{$gname}</option>".PHP_EOL; $groups->moveNext(); } - echo "</select>\n"; + echo '</select>'.PHP_EOL; } - echo "</td></tr>\n"; - echo "<tr><th class=\"data left required\">{$this->lang['strprivileges']}</th>\n"; - echo "<td class=\"data1\">\n"; + echo '</td></tr>'.PHP_EOL; + echo "<tr><th class=\"data left required\">{$this->lang['strprivileges']}</th>".PHP_EOL; + echo '<td class="data1">'.PHP_EOL; foreach ($data->privlist[$_REQUEST['subject']] as $v) { $v = htmlspecialchars($v); echo "<input type=\"checkbox\" id=\"privilege[${v}]\" name=\"privilege[${v}]\"", - isset($_REQUEST['privilege'][$v]) ? ' checked="checked"' : '', " /><label for=\"privilege[${v}]\">{$v}</label><br />\n"; + isset($_REQUEST['privilege'][$v]) ? ' checked="checked"' : '', " /><label for=\"privilege[${v}]\">{$v}</label><br />".PHP_EOL; } - echo "</td></tr>\n"; + echo '</td></tr>'.PHP_EOL; // Grant option if ($data->hasGrantOption()) { - echo "<tr><th class=\"data left\">{$this->lang['stroptions']}</th>\n"; - echo "<td class=\"data1\">\n"; + echo "<tr><th class=\"data left\">{$this->lang['stroptions']}</th>".PHP_EOL; + echo '<td class="data1">'.PHP_EOL; if ('grant' == $mode) { echo '<input type="checkbox" id="grantoption" name="grantoption"', - isset($_REQUEST['grantoption']) ? ' checked="checked"' : '', " /><label for=\"grantoption\">GRANT OPTION</label>\n"; + isset($_REQUEST['grantoption']) ? ' checked="checked"' : '', ' /><label for="grantoption">GRANT OPTION</label>'.PHP_EOL; } elseif ('revoke' == $mode) { echo '<input type="checkbox" id="grantoption" name="grantoption"', - isset($_REQUEST['grantoption']) ? ' checked="checked"' : '', " /><label for=\"grantoption\">GRANT OPTION FOR</label><br />\n"; + isset($_REQUEST['grantoption']) ? ' checked="checked"' : '', ' /><label for="grantoption">GRANT OPTION FOR</label><br />'.PHP_EOL; echo '<input type="checkbox" id="cascade" name="cascade"', - isset($_REQUEST['cascade']) ? ' checked="checked"' : '', " /><label for=\"cascade\">CASCADE</label><br />\n"; + isset($_REQUEST['cascade']) ? ' checked="checked"' : '', ' /><label for="cascade">CASCADE</label><br />'.PHP_EOL; } - echo "</td></tr>\n"; + echo '</td></tr>'.PHP_EOL; } - echo "</table>\n"; + echo '</table>'.PHP_EOL; - echo "<p><input type=\"hidden\" name=\"action\" value=\"save\" />\n"; - echo '<input type="hidden" name="mode" value="', htmlspecialchars($mode), "\" />\n"; - echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), "\" />\n"; + echo '<p><input type="hidden" name="action" value="save" />'.PHP_EOL; + echo '<input type="hidden" name="mode" value="', htmlspecialchars($mode), '" />'.PHP_EOL; + echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />'.PHP_EOL; if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) { echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['subject'].'_oid'), - '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject'].'_oid']), "\" />\n"; + '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject'].'_oid']), '" />'.PHP_EOL; } echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['subject']), - '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject']]), "\" />\n"; + '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject']]), '" />'.PHP_EOL; if ('column' == $_REQUEST['subject']) { echo '<input type="hidden" name="table" value="', - htmlspecialchars($_REQUEST['table']), "\" />\n"; + htmlspecialchars($_REQUEST['table']), '" />'.PHP_EOL; } echo $this->misc->form; - echo sprintf('<input type="submit" name="%s" value="%s" />%s', $mode, $this->lang['str'.$mode], "\n"); + echo sprintf('<input type="submit" name="%s" value="%s" />%s', $mode, $this->lang['str'.$mode], PHP_EOL); echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>"; - echo "</form>\n"; + echo '</form>'.PHP_EOL; } /** |