mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
\r can be part of a query
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1017 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -9,8 +9,7 @@ page_header(lang('SQL command'), $error);
|
||||
|
||||
if (!$error && $_POST) {
|
||||
$query = ($_POST["webfile"] ? @file_get_contents("adminer.sql") : ($_POST["file"] ? get_file("sql_file") : $_POST["query"]));
|
||||
if (is_string($query)) { // get_file() returns error as number
|
||||
$query = str_replace("\r", "", $query); // parser looks for \n
|
||||
if (is_string($query)) { // get_file() returns error as number, file_get_contents as false
|
||||
$query = rtrim($query);
|
||||
if (strlen($query) && (!$history || end($history) != $query)) { // don't add repeated
|
||||
$history[] = $query;
|
||||
|
Reference in New Issue
Block a user