Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Figueroa <amenadiel@gmail.com>2018-06-08 00:59:03 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2018-06-08 00:59:03 +0300
commit86d4dac391f1beca18d4b0c3ced41aa07554bbd6 (patch)
tree421a44bf6a0a33089ad30a074a75a7bfd28c369c /src/controllers/DisplayController.php
parent211bd7f9b8f41bc86d6c09e1cd08b5982ab2ae24 (diff)
replace usage of "\n" with PHP_EOL
Diffstat (limited to 'src/controllers/DisplayController.php')
-rw-r--r--src/controllers/DisplayController.php162
1 files changed, 81 insertions, 81 deletions
diff --git a/src/controllers/DisplayController.php b/src/controllers/DisplayController.php
index 5b4b0ac9..8901b666 100644
--- a/src/controllers/DisplayController.php
+++ b/src/controllers/DisplayController.php
@@ -31,11 +31,11 @@ class DisplayController extends BaseController
$scripts = '<script src="'.\SUBFOLDER.'/assets/js/display.js" type="text/javascript"></script>';
- $scripts .= '<script type="text/javascript">'."\n";
+ $scripts .= '<script type="text/javascript">'.PHP_EOL;
$scripts .= "var Display = {\n";
$scripts .= "errmsg: '".str_replace("'", "\\'", $this->lang['strconnectionfail'])."'\n";
$scripts .= "};\n";
- $scripts .= '</script>'."\n";
+ $scripts .= '</script>'.PHP_EOL;
$footer_template = 'footer.twig';
$header_template = 'header.twig';
@@ -228,7 +228,7 @@ class DisplayController extends BaseController
echo '<form method="post" id="sqlform" action="'.$_SERVER['REQUEST_URI'].'">';
echo $this->misc->form;
if ($object) {
- echo '<input type="hidden" name="'.$subject.'" value="', htmlspecialchars($object), '" />'."\n";
+ echo '<input type="hidden" name="'.$subject.'" value="', htmlspecialchars($object), '" />'.PHP_EOL;
}
echo '<textarea width="90%" name="query" id="query" rows="5" cols="100" resizable="true">';
echo htmlspecialchars($query);
@@ -432,7 +432,7 @@ class DisplayController extends BaseController
public function printResultsTable($resultset, $page, $max_pages, $_gets, $object)
{
if (!is_object($resultset) || $resultset->recordCount() <= 0) {
- echo "<p>{$this->lang['strnodata']}</p>"."\n";
+ echo "<p>{$this->lang['strnodata']}</p>".PHP_EOL;
return;
}
@@ -522,19 +522,19 @@ class DisplayController extends BaseController
// Display edit and delete actions if we have a key
$colspan = count($buttons);
if ($colspan > 0 and count($key) > 0) {
- echo "<th colspan=\"{$colspan}\" class=\"data\">{$this->lang['stractions']}</th>"."\n";
+ echo "<th colspan=\"{$colspan}\" class=\"data\">{$this->lang['stractions']}</th>".PHP_EOL;
}
// we show OIDs only if we are in TABLE or SELECT type browsing
$this->printTableHeaderCells($resultset, $_gets, isset($object));
- echo '</tr>'."\n";
+ echo '</tr>'.PHP_EOL;
$i = 0;
reset($resultset->fields);
while (!$resultset->EOF) {
$id = (0 == ($i % 2) ? '1' : '2');
- echo "<tr class=\"data{$id}\">"."\n";
+ echo "<tr class=\"data{$id}\">".PHP_EOL;
// Display edit and delete links if we have a key
if ($colspan <= 0 || count($key) <= 0) {
continue;
@@ -550,10 +550,10 @@ class DisplayController extends BaseController
$keys_array["key[{$v}]"] = $resultset->fields[$v];
}
if ($has_nulls) {
- echo "<td colspan=\"{$colspan}\">&nbsp;</td>"."\n";
+ echo "<td colspan=\"{$colspan}\">&nbsp;</td>".PHP_EOL;
$this->printTableRowCells($resultset, $fkey_information, isset($object));
- echo '</tr>'."\n";
+ echo '</tr>'.PHP_EOL;
$resultset->moveNext();
++$i;
@@ -578,18 +578,18 @@ class DisplayController extends BaseController
foreach ($actions['actionbuttons'] as $this->action) {
echo "<td class=\"opbutton{$id}\">";
$this->printLink($this->action, true, __METHOD__);
- echo '</td>'."\n";
+ echo '</td>'.PHP_EOL;
}
$this->printTableRowCells($resultset, $fkey_information, isset($object));
- echo '</tr>'."\n";
+ echo '</tr>'.PHP_EOL;
$resultset->moveNext();
++$i;
}
- echo '</table>'."\n";
+ echo '</table>'.PHP_EOL;
- echo '<p>', $resultset->recordCount(), " {$this->lang['strrows']}</p>"."\n";
+ echo '<p>', $resultset->recordCount(), " {$this->lang['strrows']}</p>".PHP_EOL;
// Show page navigation
echo $paginator;
}
@@ -616,7 +616,7 @@ class DisplayController extends BaseController
$finfo = $resultset->fetchField($index);
if (false === $args) {
- echo '<th class="data">', $this->misc->printVal($finfo->name), '</th>'."\n";
+ echo '<th class="data">', $this->misc->printVal($finfo->name), '</th>'.PHP_EOL;
continue;
}
@@ -633,7 +633,7 @@ class DisplayController extends BaseController
$icon = ('asc' == $_REQUEST['sortdir']) ? $this->misc->icon('RaiseArgument') : $this->misc->icon('LowerArgument');
echo sprintf('<img src="%s" alt="%s">', $icon, $_REQUEST['sortdir']);
}
- echo '</a></th>'."\n";
+ echo '</a></th>'.PHP_EOL;
}
reset($resultset->fields);
@@ -725,16 +725,16 @@ class DisplayController extends BaseController
$fksprops = $this->_getFKProps();
- echo '<form action="'.\SUBFOLDER.'/src/views/display" method="post" id="ac_form">'."\n";
+ echo '<form action="'.\SUBFOLDER.'/src/views/display" method="post" id="ac_form">'.PHP_EOL;
$elements = 0;
$error = true;
if (1 == $resultset->recordCount() && $attrs->recordCount() > 0) {
- echo '<table>'."\n";
+ echo '<table>'.PHP_EOL;
// Output table header
echo "<tr><th class=\"data\">{$this->lang['strcolumn']}</th><th class=\"data\">{$this->lang['strtype']}</th>";
- echo "<th class=\"data\">{$this->lang['strformat']}</th>"."\n";
+ echo "<th class=\"data\">{$this->lang['strformat']}</th>".PHP_EOL;
echo "<th class=\"data\">{$this->lang['strnull']}</th><th class=\"data\">{$this->lang['strvalue']}</th></tr>";
$i = 0;
@@ -747,19 +747,19 @@ class DisplayController extends BaseController
$_REQUEST['format'][$attrs->fields['attname']] = 'VALUE';
}
- echo "<tr class=\"data{$id}\">"."\n";
+ echo "<tr class=\"data{$id}\">".PHP_EOL;
echo '<td style="white-space:nowrap;">', $this->misc->printVal($attrs->fields['attname']), '</td>';
- echo '<td style="white-space:nowrap;">'."\n";
+ echo '<td style="white-space:nowrap;">'.PHP_EOL;
echo $this->misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod']));
echo '<input type="hidden" name="types[', htmlspecialchars($attrs->fields['attname']), ']" value="',
htmlspecialchars($attrs->fields['type']), '" /></td>';
++$elements;
- echo '<td style="white-space:nowrap;">'."\n";
- echo '<select name="format['.htmlspecialchars($attrs->fields['attname']), ']">'."\n";
- echo '<option value="VALUE"', ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$this->lang['strvalue']}</option>"."\n";
+ echo '<td style="white-space:nowrap;">'.PHP_EOL;
+ echo '<select name="format['.htmlspecialchars($attrs->fields['attname']), ']">'.PHP_EOL;
+ echo '<option value="VALUE"', ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$this->lang['strvalue']}</option>".PHP_EOL;
$selected = ($_REQUEST['format'][$attrs->fields['attname']] == 'EXPRESSION') ? ' selected="selected"' : '';
- echo '<option value="EXPRESSION"'.$selected.">{$this->lang['strexpression']}</option>"."\n";
- echo "</select>\n</td>"."\n";
+ echo '<option value="EXPRESSION"'.$selected.">{$this->lang['strexpression']}</option>".PHP_EOL;
+ echo "</select>\n</td>".PHP_EOL;
++$elements;
echo '<td style="white-space:nowrap;">';
// Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS)
@@ -769,7 +769,7 @@ class DisplayController extends BaseController
$_REQUEST['nulls'][$attrs->fields['attname']] = 'on';
}
echo "<label><span><input type=\"checkbox\" class=\"nullcheckbox\" name=\"nulls[{$attrs->fields['attname']}]\"",
- isset($_REQUEST['nulls'][$attrs->fields['attname']]) ? ' checked="checked"' : '', ' /></span></label></td>'."\n";
+ isset($_REQUEST['nulls'][$attrs->fields['attname']]) ? ' checked="checked"' : '', ' /></span></label></td>'.PHP_EOL;
++$elements;
} else {
echo '&nbsp;</td>';
@@ -796,53 +796,53 @@ class DisplayController extends BaseController
echo '</td>';
++$elements;
- echo '</tr>'."\n";
+ echo '</tr>'.PHP_EOL;
++$i;
$attrs->moveNext();
}
- echo '</table>'."\n";
+ echo '</table>'.PHP_EOL;
$error = false;
} elseif (1 != $resultset->recordCount()) {
- echo "<p>{$this->lang['strrownotunique']}</p>"."\n";
+ echo "<p>{$this->lang['strrownotunique']}</p>".PHP_EOL;
} else {
- echo "<p>{$this->lang['strinvalidparam']}</p>"."\n";
+ echo "<p>{$this->lang['strinvalidparam']}</p>".PHP_EOL;
}
- echo '<input type="hidden" name="action" value="editrow" />'."\n";
+ echo '<input type="hidden" name="action" value="editrow" />'.PHP_EOL;
echo $this->misc->form;
- echo isset($_REQUEST['table']) ? sprintf('<input type="hidden" name="table" value="%s" />%s', htmlspecialchars($_REQUEST['table']), "\n") : '';
+ echo isset($_REQUEST['table']) ? sprintf('<input type="hidden" name="table" value="%s" />%s', htmlspecialchars($_REQUEST['table']), PHP_EOL) : '';
- echo isset($_REQUEST['subject']) ? sprintf('<input type="hidden" name="subject" value="%s" />%s', htmlspecialchars($_REQUEST['subject']), "\n") : '';
+ echo isset($_REQUEST['subject']) ? sprintf('<input type="hidden" name="subject" value="%s" />%s', htmlspecialchars($_REQUEST['subject']), PHP_EOL) : '';
- echo isset($_REQUEST['query']) ? sprintf('<input type="hidden" name="query" value="%s" />%s', htmlspecialchars($_REQUEST['query']), "\n") : '';
+ echo isset($_REQUEST['query']) ? sprintf('<input type="hidden" name="query" value="%s" />%s', htmlspecialchars($_REQUEST['query']), PHP_EOL) : '';
- echo isset($_REQUEST['count']) ? sprintf('<input type="hidden" name="count" value="%s" />%s', htmlspecialchars($_REQUEST['count']), "\n") : '';
+ echo isset($_REQUEST['count']) ? sprintf('<input type="hidden" name="count" value="%s" />%s', htmlspecialchars($_REQUEST['count']), PHP_EOL) : '';
- echo isset($_REQUEST['return']) ? sprintf('<input type="hidden" name="return" value="%s" />%s', htmlspecialchars($_REQUEST['return']), "\n") : '';
+ echo isset($_REQUEST['return']) ? sprintf('<input type="hidden" name="return" value="%s" />%s', htmlspecialchars($_REQUEST['return']), PHP_EOL) : '';
- echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'."\n";
- echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'."\n";
- echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'."\n";
- echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'."\n";
- echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($key))), '" />'."\n";
+ echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($key))), '" />'.PHP_EOL;
echo '<p>';
if (!$error) {
- echo "<input type=\"submit\" name=\"save\" accesskey=\"r\" value=\"{$this->lang['strsave']}\" />"."\n";
+ echo "<input type=\"submit\" name=\"save\" accesskey=\"r\" value=\"{$this->lang['strsave']}\" />".PHP_EOL;
}
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />"."\n";
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />".PHP_EOL;
if (false !== $fksprops) {
$autocomplete_string = "<input type=\"checkbox\" id=\"no_ac\" value=\"0\" /><label for=\"no_ac\">{$this->lang['strac']}</label>";
if ('default off' != $this->conf['autocomplete']) {
$autocomplete_string = "<input type=\"checkbox\" id=\"no_ac\" value=\"1\" checked=\"checked\" /><label for=\"no_ac\">{$this->lang['strac']}</label>";
}
- echo $autocomplete_string."\n";
+ echo $autocomplete_string.PHP_EOL;
}
- echo '</p>'."\n";
- echo '</form>'."\n";
+ echo '</p>'.PHP_EOL;
+ echo '</form>'.PHP_EOL;
echo '<script src="'.\SUBFOLDER.'/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
}
@@ -892,58 +892,58 @@ class DisplayController extends BaseController
$resultset = $data->browseRow($_REQUEST['table'], $_REQUEST['key']);
- echo '<form action="'.\SUBFOLDER.'/src/views/display" method="post">'."\n";
+ echo '<form action="'.\SUBFOLDER.'/src/views/display" method="post">'.PHP_EOL;
echo $this->misc->form;
if (1 == $resultset->recordCount()) {
- echo "<p>{$this->lang['strconfdeleterow']}</p>"."\n";
+ echo "<p>{$this->lang['strconfdeleterow']}</p>".PHP_EOL;
$fkinfo = [];
echo '<table><tr>';
$this->printTableHeaderCells($resultset, false, true);
echo '</tr>';
- echo '<tr class="data1">'."\n";
+ echo '<tr class="data1">'.PHP_EOL;
$this->printTableRowCells($resultset, $fkinfo, true);
- echo '</tr>'."\n";
- echo '</table>'."\n";
- echo '<br />'."\n";
+ echo '</tr>'.PHP_EOL;
+ echo '</table>'.PHP_EOL;
+ echo '<br />'.PHP_EOL;
- echo '<input type="hidden" name="action" value="delrow" />'."\n";
- echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />"."\n";
- echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />"."\n";
+ echo '<input type="hidden" name="action" value="delrow" />'.PHP_EOL;
+ echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />".PHP_EOL;
+ echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />".PHP_EOL;
} elseif (1 != $resultset->recordCount()) {
- echo "<p>{$this->lang['strrownotunique']}</p>"."\n";
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />"."\n";
+ echo "<p>{$this->lang['strrownotunique']}</p>".PHP_EOL;
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />".PHP_EOL;
} else {
- echo "<p>{$this->lang['strinvalidparam']}</p>"."\n";
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />"."\n";
+ echo "<p>{$this->lang['strinvalidparam']}</p>".PHP_EOL;
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />".PHP_EOL;
}
if (isset($_REQUEST['table'])) {
- echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'."\n";
+ echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'.PHP_EOL;
}
if (isset($_REQUEST['subject'])) {
- echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />'."\n";
+ echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />'.PHP_EOL;
}
if (isset($_REQUEST['query'])) {
- echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />'."\n";
+ echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />'.PHP_EOL;
}
if (isset($_REQUEST['count'])) {
- echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />'."\n";
+ echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />'.PHP_EOL;
}
if (isset($_REQUEST['return'])) {
- echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />'."\n";
+ echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />'.PHP_EOL;
}
- echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'."\n";
- echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'."\n";
- echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'."\n";
- echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'."\n";
- echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($_REQUEST['key']))), '" />'."\n";
- echo '</form>'."\n";
+ echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'.PHP_EOL;
+ echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($_REQUEST['key']))), '" />'.PHP_EOL;
+ echo '</form>'.PHP_EOL;
} else {
$status = $data->deleteRow($_POST['table'], unserialize(urldecode($_POST['key'])));
if (0 == $status) {
@@ -1029,7 +1029,7 @@ class DisplayController extends BaseController
$max_pages
);
- echo '<a href="javascript:void(0);" style="display:table-cell;" class="fk_delete"><img alt="[delete]" src="'.$this->misc->icon('Delete').'" /></a>'."\n";
+ echo '<a href="javascript:void(0);" style="display:table-cell;" class="fk_delete"><img alt="[delete]" src="'.$this->misc->icon('Delete').'" /></a>'.PHP_EOL;
echo '<div style="display:table-cell;">';
if (is_object($resultset) && $resultset->recordCount() > 0) {
@@ -1040,10 +1040,10 @@ class DisplayController extends BaseController
echo '<table><tr>';
$this->printTableHeaderCells($resultset, false, true);
echo '</tr>';
- echo '<tr class="data1">'."\n";
+ echo '<tr class="data1">'.PHP_EOL;
$this->printTableRowCells($resultset, $fkinfo, true);
- echo '</tr>'."\n";
- echo '</table>'."\n";
+ echo '</tr>'.PHP_EOL;
+ echo '</table>'.PHP_EOL;
} else {
echo $this->lang['strnodata'];
}
@@ -1094,23 +1094,23 @@ class DisplayController extends BaseController
unset($gets['page']);
$url = http_build_query($gets);
- $result = '<p style="text-align: center">'."\n";
+ $result = '<p style="text-align: center">'.PHP_EOL;
if ($page != 1) {
- $result .= sprintf('<a class="pagenav" href="?%s&page=1">%s</a>%s&nbsp;', $url, $lang['strfirst'], "\n");
- $result .= sprintf('<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $page - 1, $lang['strprev'], "\n");
+ $result .= sprintf('<a class="pagenav" href="?%s&page=1">%s</a>%s&nbsp;', $url, $lang['strfirst'], PHP_EOL);
+ $result .= sprintf('<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $page - 1, $lang['strprev'], PHP_EOL);
}
list($min_page, $max_page) = $this->_getMinMaxPages($page, $pages);
for ($i = $min_page; $i <= $max_page; ++$i) {
- $result .= (($i === $page) ? $i : sprintf('<a class="pagenav" href="display?%s&page=%s">%s</a>', $url, $i, $i))."\n";
+ $result .= (($i === $page) ? $i : sprintf('<a class="pagenav" href="display?%s&page=%s">%s</a>', $url, $i, $i)).PHP_EOL;
}
if ($page != $pages) {
- $result .= sprintf('<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $page + 1, $lang['strnext'], "\n");
- $result .= sprintf('&nbsp;<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $pages, $lang['strlast'], "\n");
+ $result .= sprintf('<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $page + 1, $lang['strnext'], PHP_EOL);
+ $result .= sprintf('&nbsp;<a class="pagenav" href="?%s&page=%s">%s</a>%s', $url, $pages, $lang['strlast'], PHP_EOL);
}
- $result .= "</p>\n";
+ $result .= '</p>'.PHP_EOL;
return $result;
}