diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 9c3a9f17..2e01bda2 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -164,7 +164,7 @@ function get_file($key) { function upload_error($error) { $max_size = ($error == UPLOAD_ERR_INI_SIZE ? ini_get("upload_max_filesize") : null); // post_max_size is checked in index.php - return lang('Unable to upload a file.') . ($max_size ? " " . lang('Maximum allowed file size is %sB.', $max_size) : ""); + return ($error ? lang('Unable to upload a file.') . ($max_size ? " " . lang('Maximum allowed file size is %sB.', $max_size) : "") : lang('File does not exist.')); } function odd($s = ' class="odd"') { diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php index fb41d63a..12ae373e 100644 --- a/adminer/lang/cs.inc.php +++ b/adminer/lang/cs.inc.php @@ -222,4 +222,6 @@ $translations = array( 'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.', 'Clear' => 'Vyčistit', 'Editor' => 'Editor', + 'Webserver file %s' => 'Soubor %s na webovém serveru', + 'File does not exist.' => 'Soubor neexistuje.', ); diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index ec5b853a..2fe94edd 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -8,7 +8,7 @@ if (!$error && $_POST["clear"]) { page_header(lang('SQL command'), $error); if (!$error && $_POST) { - $query = (isset($_POST["file"]) ? get_file("sql_file") : $_POST["query"]); + $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 $query = rtrim($query); @@ -109,6 +109,8 @@ if (!ini_get("file_uploads")) { +

adminer.sql'); ?> + " . lang('History') . "\n"; diff --git a/changes.txt b/changes.txt index 28cc0a0b..53eea7f5 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ -Adminer 2.1.0: +Adminer 2.1.0-dev: Edit default values directly in table creation +Execute SQL file stored on server disk Display column comments in table overview Respect max_allowed_packet in CSV import Click on row selects it diff --git a/todo.txt b/todo.txt index 2e5db997..0d820a7b 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,4 @@ Bulk database drop -Execute SQL file stored on server disk Print CREATE+ALTER export instead of running it Add whisperer to fields with foreign key Highlight found fields