Added some more links separators

This commit is contained in:
Lionel Laffineur 2023-07-15 17:30:58 +02:00
parent 493de37977
commit c36df643e6
2 changed files with 9 additions and 5 deletions

View file

@ -924,9 +924,9 @@ class Adminer {
*/
function homepage() {
echo '<p class="links">' . ($_GET["ns"] == "" && support("database") ? '<a href="' . h(ME) . 'database=">' . lang('Alter database') . "</a>\n" : "");
echo (support("scheme") ? "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n" : "");
echo ($_GET["ns"] !== "" ? '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n" : "");
echo (support("privileges") ? "<a href='" . h(ME) . "privileges='>" . lang('Privileges') . "</a>\n" : "");
echo (support("scheme") ? " | <a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n" : "");
echo ($_GET["ns"] !== "" ? ' | <a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n" : "");
echo (support("privileges") ? " | <a href='" . h(ME) . "privileges='>" . lang('Privileges') . "</a>\n" : "");
return true;
}

View file

@ -11,14 +11,18 @@ function connect_error() {
page_header(lang('Select database'), $error, false);
echo "<p class='links'>\n";
foreach (array(
$links = array(
'database' => lang('Create database'),
'privileges' => lang('Privileges'),
'processlist' => lang('Process list'),
'variables' => lang('Variables'),
'status' => lang('Status'),
) as $key => $val) {
);
foreach ($links as $key => $val) {
if (support($key)) {
if ($key !== array_key_first($links)) {
echo " | ";
}
echo "<a href='" . h(ME) . "$key='>$val</a>\n";
}
}