Hide SQL command link in case of an error

This commit is contained in:
Jakub Vrana 2010-10-18 07:38:23 +02:00
parent d49903b21d
commit f7d4587880

View file

@ -523,10 +523,14 @@ document.getElementById('username').focus();
?> ?>
<form action="" method="post"> <form action="" method="post">
<p class="logout"> <p class="logout">
<a href="<?php echo h(ME); ?>sql="><?php echo bold(lang('SQL command'), isset($_GET["sql"])); ?></a> <?php
<?php if (support("dump")) { ?> if (DB == "" || !$missing) {
<a href="<?php echo h(ME); ?>dump=<?php echo urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]); ?>"><?php echo bold(lang('Dump'), isset($_GET["dump"])); ?></a> echo "<a href='" . h(ME) . "sql='>" . bold(lang('SQL command'), isset($_GET["sql"])) . "</a>\n";
<?php } ?> if (support("dump")) {
echo "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "'>" . bold(lang('Dump'), isset($_GET["dump"])) . "</a>\n";
}
}
?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>"> <input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
</p> </p>
@ -544,7 +548,7 @@ document.getElementById('username').focus();
set_schema($_GET["ns"]); set_schema($_GET["ns"]);
} }
} }
if ($_GET["ns"] !== "" && $missing != "ns") { if ($_GET["ns"] !== "" && !$missing) {
$tables = tables_list(); $tables = tables_list();
if (!$tables) { if (!$tables) {
echo "<p class='message'>" . lang('No tables.') . "\n"; echo "<p class='message'>" . lang('No tables.') . "\n";