mirror of
https://github.com/vrana/adminer.git
synced 2025-08-20 13:21:30 +02:00
Replace strlen() by != ""
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1288 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
function connect_error() {
|
||||
global $connection, $VERSION, $token, $error;
|
||||
if (strlen(DB)) {
|
||||
if (DB != "") {
|
||||
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), false);
|
||||
} else {
|
||||
if ($_POST["db"] && !$error) {
|
||||
@@ -51,8 +51,8 @@ function connect_error() {
|
||||
if (isset($_GET["status"])) {
|
||||
$_GET["variables"] = $_GET["status"];
|
||||
}
|
||||
if (!(strlen(DB) ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]))) {
|
||||
if (strlen(DB)) {
|
||||
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]))) {
|
||||
if (DB != "") {
|
||||
unset($_SESSION["databases"][$_GET["server"]]);
|
||||
}
|
||||
connect_error(); // separate function to catch SQLite error
|
||||
|
Reference in New Issue
Block a user