1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Upload error only if not other error

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@507 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2008-09-30 12:22:24 +00:00
parent 49f7886f41
commit 4bee1c0f30

View File

@@ -5,7 +5,8 @@ if (isset($_POST["query"])) {
}
page_header(lang('SQL command'), $error);
if (!$error && $_POST && is_string($query = (isset($_POST["query"]) ? $_POST["query"] : get_file("sql_file")))) {
if (!$error && $_POST) {
if (is_string($query = (isset($_POST["query"]) ? $_POST["query"] : get_file("sql_file")))) {
$delimiter = ";";
$offset = 0;
$empty = true;
@@ -45,8 +46,9 @@ if (!$error && $_POST && is_string($query = (isset($_POST["query"]) ? $_POST["qu
if ($empty) {
echo "<p class='message'>" . lang('No commands to execute.') . "</p>\n";
}
} elseif ($_POST) {
} else {
echo "<p class='error'>" . lang('Unable to upload a file.') . "</p>\n";
}
}
?>