1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Define DB

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1044 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-08-29 13:54:25 +00:00
parent d58858c101
commit 3022dcb82d
13 changed files with 46 additions and 46 deletions

View File

@@ -25,8 +25,8 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
$link = substr(preg_replace('~db=[^&]*&~', '', ME), 0, -1);
echo '<p id="breadcrumb"><a href="' . (strlen($link) ? h($link) : ".") . '">' . (isset($_GET["server"]) ? h($_GET["server"]) : lang('Server')) . '</a> &raquo; ';
if (is_array($breadcrumb)) {
if (strlen($_GET["db"])) {
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["db"]) . '</a> &raquo; ';
if (strlen(DB)) {
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h(DB) . '</a> &raquo; ';
}
foreach ($breadcrumb as $key => $val) {
$desc = (is_array($val) ? $val[1] : $val);
@@ -43,7 +43,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
$_SESSION["messages"] = array();
}
$databases = &$_SESSION["databases"][$_GET["server"]];
if (strlen($_GET["db"]) && $databases && !in_array($_GET["db"], $databases, true)) {
if (strlen(DB) && $databases && !in_array(DB, $databases, true)) {
$databases = null;
}
if (isset($databases) && !isset($_GET["sql"])) {