Move schema link to Adminer::homepage method

This commit is contained in:
Jakub Vrana 2011-06-03 13:49:47 +02:00
parent d09f05b01b
commit 98e410f42d
3 changed files with 3 additions and 5 deletions

View file

@ -38,7 +38,6 @@ page_header(($_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema'
if ($adminer->homepage()) {
if ($_GET["ns"] !== "") {
echo '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n";
echo "<h3>" . lang('Tables and views') . "</h3>\n";
$tables_list = tables_list();
if (!$tables_list) {

View file

@ -898,7 +898,7 @@ if (!defined("DRIVER")) {
}
/** Check whether a feature is supported
* @param string "comment", "drop_col", "dump", "event", "partitioning", "routine", "scheme", "sequence", "status", "trigger", "type", "variables", "view", "copy"
* @param string "comment", "copy", "drop_col", "dump", "event", "partitioning", "privileges", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "variables", "view"
* @return bool
*/
function support($feature) {

View file

@ -719,9 +719,8 @@ DROP PROCEDURE adminer_alter;
*/
function homepage() {
echo '<p>' . ($_GET["ns"] == "" ? '<a href="' . h(ME) . 'database=">' . lang('Alter database') . "</a>\n" : "");
if (support("scheme")) {
echo "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n";
}
echo (support("scheme") ? "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>\n" : "");
echo '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n";
return true;
}