From 4e2a448e28fe1ba1fecfa8375fbc940a7a494105 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 11 May 2020 12:35:19 +0200 Subject: [PATCH 001/144] Escape : also in remove_from_param --- adminer/include/bootstrap.inc.php | 2 +- adminer/include/functions.inc.php | 2 +- adminer/include/version.inc.php | 2 +- changes.txt | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index 621ec4653..6a56945d6 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -84,7 +84,7 @@ define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost define("DB", $_GET["db"]); // for the sake of speed and size -define("ME", str_replace(":", "%3a", preg_replace('~\?.*~', '', relative_uri())) . '?' +define("ME", preg_replace('~\?.*~', '', relative_uri()) . '?' . (sid() ? SID . '&' : '') . (SERVER !== null ? DRIVER . "=" . urlencode(SERVER) . '&' : '') . (isset($_GET["username"]) ? "username=" . urlencode($_GET["username"]) . '&' : '') diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index adcf1fbd2..4eba85c88 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -725,7 +725,7 @@ function format_time($start) { * @return string */ function relative_uri() { - return preg_replace('~^[^?]*/([^?]*)~', '\1', $_SERVER["REQUEST_URI"]); + return str_replace(":", "%3a", preg_replace('~^[^?]*/([^?]*)~', '\1', $_SERVER["REQUEST_URI"])); } /** Remove parameter from query string diff --git a/adminer/include/version.inc.php b/adminer/include/version.inc.php index 853359abf..809cc9989 100644 --- a/adminer/include/version.inc.php +++ b/adminer/include/version.inc.php @@ -1,2 +1,2 @@ Date: Sun, 6 Dec 2020 12:37:00 +0100 Subject: [PATCH 002/144] Fix style --- adminer/drivers/clickhouse.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/drivers/clickhouse.inc.php b/adminer/drivers/clickhouse.inc.php index ccb4c697d..d72109d5b 100644 --- a/adminer/drivers/clickhouse.inc.php +++ b/adminer/drivers/clickhouse.inc.php @@ -306,7 +306,7 @@ function unconvert_field($field, $return) { function fields($table) { $return = array(); $result = get_rows("SELECT name, type, default_expression FROM system.columns WHERE " . idf_escape('table') . " = " . q($table)); - foreach($result as $row) { + foreach ($result as $row) { $type = trim($row['type']); $nullable = strpos($type, 'Nullable(') === 0; $return[trim($row['name'])] = array( From 697eedc6a167622b3a47dfe403ec349389bbe9bb Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 12:47:58 +0100 Subject: [PATCH 003/144] Avoid each() not available in PHP 8 --- adminer/include/functions.inc.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 4eba85c88..ea9d81b39 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -849,19 +849,18 @@ function friendly_url($val) { /** Print hidden fields * @param array * @param array +* @param string * @return bool */ -function hidden_fields($process, $ignore = array()) { +function hidden_fields($process, $ignore = array(), $prefix = '') { $return = false; - while (list($key, $val) = each($process)) { + foreach ($process as $key => $val) { if (!in_array($key, $ignore)) { if (is_array($val)) { - foreach ($val as $k => $v) { - $process[$key . "[$k]"] = $v; - } + hidden_fields($val, array(), $key); } else { $return = true; - echo ''; + echo ''; } } } From 50bb83dbf2e1f5eba42ffd8f7c2ccfb990b1610a Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 20 Oct 2020 21:04:33 +0200 Subject: [PATCH 004/144] Fix compatibility with PHP 8 --- adminer/include/bootstrap.inc.php | 4 ++-- adminer/include/functions.inc.php | 2 +- adminer/include/pdo.inc.php | 14 +++++++------- changes.txt | 1 + compile.php | 12 ++++++++++-- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index 6a56945d6..04fb5cdd1 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -1,5 +1,5 @@ $v) { unset($process[$key][$k]); diff --git a/adminer/include/pdo.inc.php b/adminer/include/pdo.inc.php index 14fb91cea..4d710e277 100644 --- a/adminer/include/pdo.inc.php +++ b/adminer/include/pdo.inc.php @@ -1,8 +1,8 @@ pdo = new PDO($dsn, $username, $password, $options); } catch (Exception $ex) { auth_error(h($ex->getMessage())); } - $this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS - $this->server_info = @$this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION + $this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS + $this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION } /*abstract function select_db($database);*/ function query($query, $unbuffered = false) { - $result = parent::query($query); + $result = $this->pdo->query($query); $this->error = ""; if (!$result) { - list(, $this->errno, $this->error) = $this->errorInfo(); + list(, $this->errno, $this->error) = $this->pdo->errorInfo(); if (!$this->error) { $this->error = lang('Unknown error.'); } diff --git a/changes.txt b/changes.txt index 14f4cb989..11ddd26a8 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 4.7.8-dev: +Support PHP 8 Adminer 4.7.7 (released 2020-05-11): Fix open redirect if Adminer is accessible at //adminer.php%2F@ diff --git a/compile.php b/compile.php index 229ba1518..3bb1b6acf 100755 --- a/compile.php +++ b/compile.php @@ -1,6 +1,6 @@ #!/usr/bin/env php ?@[\]^`{|}')); + $set = array_flip(preg_split('//', '!"#$%&\'()*+,-./:;<=>?@[]^`{|}')); $space = ''; $output = ''; $in_echo = false; @@ -315,6 +315,14 @@ function compile_file($match) { return '"' . add_quo_slashes($file) . '"'; } +if (!function_exists("each")) { + function each(&$arr) { + $key = key($arr); + next($arr); + return $key === null ? false : array($key, $arr[$key]); + } +} + function min_version() { return true; } From e0a3205676213d473a584c0288d0a471338a13aa Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:00:03 +0100 Subject: [PATCH 005/144] Add missing method --- adminer/include/pdo.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/adminer/include/pdo.inc.php b/adminer/include/pdo.inc.php index 4d710e277..67217d653 100644 --- a/adminer/include/pdo.inc.php +++ b/adminer/include/pdo.inc.php @@ -24,6 +24,10 @@ function dsn($dsn, $username, $password, $options = array()) { /*abstract function select_db($database);*/ + function quote($string) { + return $this->pdo->quote($string); + } + function query($query, $unbuffered = false) { $result = $this->pdo->query($query); $this->error = ""; From 35bfaa7506eab0e9425862102af0316f573f895f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:12:58 +0100 Subject: [PATCH 006/144] Improve check for numeric ports (bug #769) --- adminer/include/auth.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index 1051186ff..964f1d907 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -162,7 +162,7 @@ function auth_error($error) { if (isset($_GET["username"]) && is_string(get_password())) { list($host, $port) = explode(":", SERVER, 2); - if (is_numeric($port) && ($port < 1024 || $port > 65535)) { + if (+$port && ($port < 1024 || $port > 65535)) { auth_error(lang('Connecting to privileged ports is not allowed.')); } check_invalid_login(); diff --git a/changes.txt b/changes.txt index 11ddd26a8..a8dd5798d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.7.8-dev: Support PHP 8 +Disallow connecting to privileged ports (bug #769) Adminer 4.7.7 (released 2020-05-11): Fix open redirect if Adminer is accessible at //adminer.php%2F@ From b0a217abddb48521d9b98fa94d9a1ee74dedfddd Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:45:55 +0100 Subject: [PATCH 007/144] Fix method call after #406 --- adminer/drivers/mysql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 379b131cb..942c0dfc8 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -267,7 +267,7 @@ function select_db($database) { } function query($query, $unbuffered = false) { - $this->setAttribute(1000, !$unbuffered); // 1000 - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY + $this->pdo->setAttribute(1000, !$unbuffered); // 1000 - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY return parent::query($query, $unbuffered); } } From 0618429bce433d85a7dd06bb094b9b7a6804c714 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:50:13 +0100 Subject: [PATCH 008/144] Avoid PDO exceptions in PHP 8 --- adminer/include/pdo.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/adminer/include/pdo.inc.php b/adminer/include/pdo.inc.php index 67217d653..f7b11c678 100644 --- a/adminer/include/pdo.inc.php +++ b/adminer/include/pdo.inc.php @@ -18,6 +18,7 @@ function dsn($dsn, $username, $password, $options = array()) { } catch (Exception $ex) { auth_error(h($ex->getMessage())); } + $this->pdo->setAttribute(3, 1); // 3 - PDO::ATTR_ERRMODE, 1 - PDO::ERRMODE_WARNING $this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS $this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION } From d6e71b5c534efcef5427db0dffeaaab2d8a03a3a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:50:44 +0100 Subject: [PATCH 009/144] MySQL: Use renamed variable --- adminer/db.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 288d113ff..a03580c19 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -112,7 +112,7 @@ } echo "" . lang('%d in total', count($tables_list)); - echo "" . h($jush == "sql" ? $connection->result("SELECT @@storage_engine") : ""); + echo "" . h($jush == "sql" ? $connection->result("SELECT @@default_storage_engine") : ""); echo "" . h(db_collation(DB, collations())); foreach (array("Data_length", "Index_length", "Data_free") as $key) { echo ""; From 190146672f6ce9b8f08af2d7e7a5e8f768d32ee6 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 6 Dec 2020 13:58:20 +0100 Subject: [PATCH 010/144] Release 4.7.8 --- adminer/include/version.inc.php | 2 +- changes.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/include/version.inc.php b/adminer/include/version.inc.php index 809cc9989..8a0f069fe 100644 --- a/adminer/include/version.inc.php +++ b/adminer/include/version.inc.php @@ -1,2 +1,2 @@ Date: Wed, 9 Dec 2020 15:09:28 +0100 Subject: [PATCH 011/144] Re-enable PHP warnings --- adminer/include/bootstrap.inc.php | 7 ++++++- adminer/include/version.inc.php | 2 +- changes.txt | 3 +++ compile.php | 9 +++++++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index 04fb5cdd1..1a6f3c4d8 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -1,5 +1,10 @@ Date: Sun, 6 Dec 2020 14:06:17 +0100 Subject: [PATCH 012/144] Travis: add php 7.4 && 8.0 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 213081d39..937ea7c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,6 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 + - 8.0 script: git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.php$' | xargs -n1 -P8 php -l | grep -v 'No syntax errors'; test $? -eq 1 From 1e1c46ac72eec83cbb99f0f1887492cb9d4429eb Mon Sep 17 00:00:00 2001 From: Evgeny Chernyavskiy Date: Fri, 3 Apr 2020 15:56:11 -0400 Subject: [PATCH 013/144] Add basic Makefile. --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..8c5dcfbf6 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +ROOT_DIRECTORY = $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))") +PHP := $(shell which php) +PORT := 8000 + + +.DEFAULT_GOAL := default + + +.PHONY: default +default: compile + +.PHONY: compile +compile: + $(PHP) $(ROOT_DIRECTORY)/compile.php + +.PHONY: server +server: + php \ + --server 127.0.0.1:$(PORT) \ + --docroot $(ROOT_DIRECTORY) + +.PHONY: initialize +initialize: + git \ + -C $(ROOT_DIRECTORY) \ + submodule \ + update \ + --init \ + --recursive + +.PHONY: clean +clean: + rm \ + --recursive \ + --force \ + $(ROOT_DIRECTORY)/adminer.php + +.PHONY: clean.all +clean.all: clean From ccd2374b0b12bd547417bf0dacdf153826c83351 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 5 Feb 2021 16:16:23 +0100 Subject: [PATCH 014/144] Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Thanks to Adam Crosser and Brian Sizemore --- adminer/drivers/clickhouse.inc.php | 2 +- adminer/drivers/elastic.inc.php | 2 +- changes.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/clickhouse.inc.php b/adminer/drivers/clickhouse.inc.php index d72109d5b..99c77ab81 100644 --- a/adminer/drivers/clickhouse.inc.php +++ b/adminer/drivers/clickhouse.inc.php @@ -22,7 +22,7 @@ function rootQuery($db, $query) { return $file; } if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { - $this->error = $file; + $this->error = lang('Invalid credentials.') . " $http_response_header[0]"; return false; } $return = json_decode($file, true); diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index a29252fe0..f2abfad7d 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -28,7 +28,7 @@ function rootQuery($path, $content = array(), $method = 'GET') { return $file; } if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) { - $this->error = $file; + $this->error = lang('Invalid credentials.') . " $http_response_header[0]"; return false; } $return = json_decode($file, true); diff --git a/changes.txt b/changes.txt index cb729decb..11f501aff 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 4.7.9-dev: +Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06): From 64d4818a824605790023838deda64c5d0dc1ff21 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 10:03:06 +0100 Subject: [PATCH 015/144] PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) --- changes.txt | 1 + externals/jush | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changes.txt b/changes.txt index 11f501aff..af1cfb5cb 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.7.9-dev: Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 +PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06): diff --git a/externals/jush b/externals/jush index 275c9cc88..408b15bb2 160000 --- a/externals/jush +++ b/externals/jush @@ -1 +1 @@ -Subproject commit 275c9cc888608f36895e3926c16e8d2e2dab0a1c +Subproject commit 408b15bb2779af1fe85ed3b5a5ccee93885f5e05 From 7b524ff5d2e4daf4e4617d3ac1c690bbd95c4308 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 10:22:12 +0100 Subject: [PATCH 016/144] Fix style (bug #743) --- designs/konya/adminer.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designs/konya/adminer.css b/designs/konya/adminer.css index 78295af6f..bb456f2fe 100644 --- a/designs/konya/adminer.css +++ b/designs/konya/adminer.css @@ -19,9 +19,9 @@ html/*\*/>/*/*/body a[href$="dump="] {background:url("data:image/png;base64,iVBO html/*\*/>/*/*/body select[name="db"] {background:white url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEYSURBVBgZBcHPio5hGAfg6/2+R980k6wmJgsJ5U/ZOAqbSc2GnXOwUg7BESgLUeIQ1GSjLFnMwsKGGg1qxJRmPM97/1zXFAAAAEADdlfZzr26miup2svnelq7d2aYgt3rebl585wN6+K3I1/9fJe7O/uIePP2SypJkiRJ0vMhr55FLCA3zgIAOK9uQ4MS361ZOSX+OrTvkgINSjS/HIvhjxNNFGgQsbSmabohKDNoUGLohsls6BaiQIMSs2FYmnXdUsygQYmumy3Nhi6igwalDEOJEjPKP7CA2aFNK8Bkyy3fdNCg7r9/fW3jgpVJbDmy5+PB2IYp4MXFelQ7izPrhkPHB+P5/PjhD5gCgCenx+VR/dODEwD+A3T7nqbxwf1HAAAAAElFTkSuQmCC") no-repeat scroll left bottom; padding-left:16px;} html/*\*/>/*/*/body select[name="db"] option {padding-left:18px;} -html/*\*/>/*/*/body #menu p a[href*="&select="] {background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHISURBVDjLpVPNK0RRFP+9D98syMwUspHkm9I0YkFZWBFKkZ0s7a3Ewh+ilChK7FgoZCJFKYlYKB8zk2+Z5t0P577He29kQU7dd+6575zf+d1zztWklPiPmOozt/U4SThjXIoyIQS4AJjSXO0lGGlvcXAm6Vzsz4xUhm0AIeX4QLig+C+ZpxbOG1wGhGYHr1zMUmZGWRgs0ha3PE1nX/8mWmdgWTzLB+DUYbhm9FfZ35IEyrhXA3VXJfPbsV8B9LQUIeUHYJ8ASobag1jcucNgW8g9W4reYSDi2YnnZDoDiwCokDANct6NwTB0LEdj0HRA/wxa2SN25JNBEdWluUhZ366gqmAaGvrCAXKOozccTGPgt8+vn8GYSGcgyTYp3dpBnBg42nbQPRBTo5bTvqYkmxL6AQhNTWQGBXY3B7BxlEBXozcW64dxRKoKUZBju+P06gl5WaaviMJBM3TNDlbypemIZgHYOnlwASsCmW7nHADGnBoQ3c76YmweJ9BR5zFYjsbRHwm4tmJg6PhWA7pCXXk+bu7fURHKweXtq/sWaksz7SC/CCGFrwtyZ3r+rCnFRZ7qr1qc6mLZj4f9OEyPL8lVpbX/PucPv5QPKHB1TdEAAAAASUVORK5CYII=") no-repeat scroll left bottom; clear:left; display:block; float:left; height:16px; margin-right:8px; padding-top:1px; overflow:hidden; padding-left:16px; width:0; text-decoration:none;} +html/*\*/>/*/*/body #menu li a[href*="&select="] {background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHISURBVDjLpVPNK0RRFP+9D98syMwUspHkm9I0YkFZWBFKkZ0s7a3Ewh+ilChK7FgoZCJFKYlYKB8zk2+Z5t0P577He29kQU7dd+6575zf+d1zztWklPiPmOozt/U4SThjXIoyIQS4AJjSXO0lGGlvcXAm6Vzsz4xUhm0AIeX4QLig+C+ZpxbOG1wGhGYHr1zMUmZGWRgs0ha3PE1nX/8mWmdgWTzLB+DUYbhm9FfZ35IEyrhXA3VXJfPbsV8B9LQUIeUHYJ8ASobag1jcucNgW8g9W4reYSDi2YnnZDoDiwCokDANct6NwTB0LEdj0HRA/wxa2SN25JNBEdWluUhZ366gqmAaGvrCAXKOozccTGPgt8+vn8GYSGcgyTYp3dpBnBg42nbQPRBTo5bTvqYkmxL6AQhNTWQGBXY3B7BxlEBXozcW64dxRKoKUZBju+P06gl5WaaviMJBM3TNDlbypemIZgHYOnlwASsCmW7nHADGnBoQ3c76YmweJ9BR5zFYjsbRHwm4tmJg6PhWA7pCXXk+bu7fURHKweXtq/sWaksz7SC/CCGFrwtyZ3r+rCnFRZ7qr1qc6mLZj4f9OEyPL8lVpbX/PucPv5QPKHB1TdEAAAAASUVORK5CYII=") no-repeat scroll left bottom; clear:left; display:block; float:left; height:16px; margin-right:8px; padding-top:1px; overflow:hidden; padding-left:16px; width:0; text-decoration:none;} -html/*\*/>/*/*/body #menu p a[href*="&table="], html/*\*/>/*/*/body #menu p a[href*="&view="] {clear:right; margin-left:24px; display:block; height:17px; padding-bottom:1px; text-decoration:none;} +html/*\*/>/*/*/body #menu li a[href*="&table="], html/*\*/>/*/*/body #menu li a[href*="&view="] {clear:right; margin-left:24px; display:block; height:17px; padding-bottom:1px; text-decoration:none;} html/*\*/>/*/*/body #menu p#tables br {display:none;} From 5a6e5b4443d55dd34896d4b5dc2f5dcb87a5ced2 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 10:32:36 +0100 Subject: [PATCH 017/144] Do not display SQL function for checkbox --- adminer/include/adminer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index d8044e5f1..500e4eaab 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -672,7 +672,7 @@ function editFunctions($field) { $return .= "/$val"; } } - if ($key && !preg_match('~set|blob|bytea|raw|file~', $field["type"])) { + if ($key && !preg_match('~set|blob|bytea|raw|file|bool~', $field["type"])) { $return .= "/SQL"; } } From 97ec60bb5f315382e774822cbcff767444fff967 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 11:15:33 +0100 Subject: [PATCH 018/144] MySQL, MariaDB: Fix doc links --- adminer/static/editing.js | 6 +++--- externals/jush | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/adminer/static/editing.js b/adminer/static/editing.js index a3b515703..73643c6e2 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -17,14 +17,14 @@ function bodyLoad(version, maria) { for (var i = 1; i < obj.length; i++) { obj[i] = obj[i] .replace(/\.html/, '/') - .replace(/(numeric)(-type-overview)/, '$1-data$2') + .replace(/-type-syntax/, '-data-types') + .replace(/numeric-(data-types)/, '$1-$&') .replace(/#statvar_.*/, '#$$1') ; } } } - obj[key] = obj[key] - .replace(/dev\.mysql\.com\/doc\/mysql\/en\//, (maria ? 'mariadb.com/kb/en/library/' : '$&')) // MariaDB + obj[key] = (maria ? obj[key].replace(/dev\.mysql\.com\/doc\/mysql\/en\//, 'mariadb.com/kb/en/library/') : obj[key]) // MariaDB .replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL .replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL ; diff --git a/externals/jush b/externals/jush index 408b15bb2..e728e6457 160000 --- a/externals/jush +++ b/externals/jush @@ -1 +1 @@ -Subproject commit 408b15bb2779af1fe85ed3b5a5ccee93885f5e05 +Subproject commit e728e6457626e1b83374f89651cd1a623c001baf From 34345d807143ebc579e967f183b2f5ceaf923d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Mas=C3=A1r?= Date: Fri, 19 Jul 2019 13:17:10 +0200 Subject: [PATCH 019/144] PostgreSQL: Export all FKs after all CREATE TABLE --- adminer/drivers/pgsql.inc.php | 42 ++++++++++++++++++++++++++++++----- adminer/dump.inc.php | 10 +++++++++ changes.txt | 1 + 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 76c40d3d5..5466ed21b 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -436,6 +436,23 @@ function foreign_keys($table) { return $return; } + function constraints($table) { + global $on_actions; + $return = array(); + foreach (get_rows("SELECT conname, consrc +FROM pg_catalog.pg_constraint +INNER JOIN pg_catalog.pg_namespace ON pg_constraint.connamespace = pg_namespace.oid +INNER JOIN pg_catalog.pg_class ON pg_constraint.conrelid = pg_class.oid AND pg_constraint.connamespace = pg_class.relnamespace +WHERE pg_constraint.contype = 'c' +AND conrelid != 0 -- handle only CONSTRAINTs here, not TYPES +AND nspname = current_schema() +AND relname = " . q($table) . " +ORDER BY connamespace, conname") as $row) { + $return[$row['conname']] = $row['consrc']; + } + return $return; + } + function view($name) { global $connection; return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . $connection->result("SELECT oid FROM pg_class WHERE relname = " . q($name)) . ")"))); @@ -704,6 +721,23 @@ function set_schema($schema, $connection2 = null) { return $return; } + // create_sql() produces CREATE TABLE without FK CONSTRAINTs + // foreign_keys_sql() produces all FK CONSTRAINTs as ALTER TABLE ... ADD CONSTRAINT + // so that all FKs can be added after all tables have been created, avoiding any need to reorder CREATE TABLE statements in order of their FK dependencies + function foreign_keys_sql($table) { + $return = ""; + + $status = table_status($table); + $fkeys = foreign_keys($table); + ksort($fkeys); + + foreach ($fkeys as $fkey_name => $fkey) { + $return .= "ALTER TABLE ONLY " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " ADD CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE') . ";\n"; + } + + return ($return ? "$return\n" : $return); + } + function create_sql($table, $auto_increment, $style) { global $connection; $return = ''; @@ -718,8 +752,7 @@ function create_sql($table, $auto_increment, $style) { $fields = fields($table); $indexes = indexes($table); ksort($indexes); - $fkeys = foreign_keys($table); - ksort($fkeys); + $constraints = constraints($table); if (!$status || empty($fields)) { return false; @@ -759,9 +792,8 @@ function create_sql($table, $auto_increment, $style) { } } - // foreign keys - foreach ($fkeys as $fkey_name => $fkey) { - $return_parts[] = "CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE'); + foreach ($constraints as $conname => $consrc) { + $return_parts[] = "CONSTRAINT " . idf_escape($conname) . " CHECK $consrc"; } $return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");"; diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index e758f458f..f6e9a48b1 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -105,6 +105,16 @@ } } + // add FKs after creating tables (except in MySQL which uses SET FOREIGN_KEY_CHECKS=0) + if (function_exists('foreign_keys_sql')) { + foreach (table_status('', true) as $name => $table_status) { + $table = (DB == "" || in_array($name, (array) $_POST["tables"])); + if ($table && !is_view($table_status)) { + echo foreign_keys_sql($name); + } + } + } + foreach ($views as $view) { $adminer->dumpTable($view, $_POST["table_style"], 1); } diff --git a/changes.txt b/changes.txt index af1cfb5cb..7fa7ad50d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.7.9-dev: Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 +PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) Re-enable PHP warnings (regression from 4.7.8) From 49f365384b6424034b0c96998c5d121b26ae94fa Mon Sep 17 00:00:00 2001 From: makss Date: Wed, 1 Apr 2020 13:56:33 +0300 Subject: [PATCH 020/144] Update Ukrainian translation. --- adminer/lang/uk.inc.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/adminer/lang/uk.inc.php b/adminer/lang/uk.inc.php index 3dbbeae62..0dfd0be85 100644 --- a/adminer/lang/uk.inc.php +++ b/adminer/lang/uk.inc.php @@ -313,4 +313,34 @@ 'Type has been dropped.' => 'Тип було видалено.', 'Type has been created.' => 'Тип було створено.', 'Alter type' => 'Змінити тип', + 'Drop %s?' => 'Вилучити %s?', + 'Materialized view' => 'Матеріалізований вигляд', + 'Selected' => 'Вибрані', + 'overwrite' => 'перезаписати', + 'DB' => 'DB', + 'File must be in UTF-8 encoding.' => 'Файл повинен бути в кодуванні UTF-8.', + 'Modify' => 'Змінити', + 'Load more data' => 'Завантажити ще дані', + 'Loading' => 'Завантаження', + 'ATTACH queries are not supported.' => 'ATTACH-запити не підтримуються.', + 'Warnings' => 'Попередження', + 'Limit rows' => 'Обмеження рядків', + 'Adminer does not support accessing a database without a password, more information.' => 'Adminer не підтримує доступ до бази даних без пароля, більше інформації.', + 'Default value' => 'Значення за замовчуванням', + 'Full table scan' => 'Повне сканування таблиці', + 'Too many unsuccessful logins, try again in %d minute(s).' => array('Занадто багато невдалих спроб входу. Спробуйте знову через %d хвилину.', 'Занадто багато невдалих спроб входу. Спробуйте знову через %d хвилини.', 'Занадто багато невдалих спроб входу. Спробуйте знову через %d хвилин.'), + 'Thanks for using Adminer, consider donating.' => 'Дякуємо, що користуєтесь Adminer, подумайте про внесок.', + 'Master password expired. Implement %s method to make it permanent.' => 'Термін дії майстер пароля минув. Реалізуйте метод %s, щоб зробити його постійним.', + 'The action will be performed after successful login with the same credentials.' => 'Дія буде виконуватися після успішного входу в систему з тими ж обліковими даними.', + 'Connecting to privileged ports is not allowed.' => 'Підключення до привілейованих портів заборонено.', + 'There is a space in the input password which might be the cause.' => 'У вхідному паролі є пробіл, який може бути причиною.', + 'If you did not send this request from Adminer then close this page.' => 'Якщо ви не посилали цей запит з Adminer, закрийте цю сторінку.', + 'You can upload a big SQL file via FTP and import it from server.' => 'Ви можете завантажити великий файл SQL через FTP та імпортувати його з сервера.', + 'Size' => 'Розмір', + 'Compute' => 'Обчислити', + 'You are offline.' => 'Ви офлайн.', + 'You have no privileges to update this table.' => 'Ви не маєте привілеїв для оновлення цієї таблиці.', + 'Saving' => 'Збереження', + 'Unknown error.' => 'Невідома помилка.', + 'Database does not support password.' => 'База даних не підтримує пароль.', ); From d888031603f78335f37d70cd7968a336d83916f9 Mon Sep 17 00:00:00 2001 From: makss Date: Wed, 1 Apr 2020 13:57:42 +0300 Subject: [PATCH 021/144] Update Russian translation. --- adminer/lang/ru.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php index fab11f988..3ee0ead4b 100644 --- a/adminer/lang/ru.inc.php +++ b/adminer/lang/ru.inc.php @@ -289,4 +289,15 @@ 'Saving' => 'Сохранение', 'yes' => 'Да', 'no' => 'Нет', + 'Drop %s?' => 'Удалить %s?', + 'overwrite' => 'перезаписать', + 'DB' => 'DB', + 'Warnings' => 'Предупреждения', + 'Adminer does not support accessing a database without a password, more information.' => 'Adminer не поддерживает доступ к базе данных без пароля, больше информации.', + 'Thanks for using Adminer, consider donating.' => 'Спасибо за использование Adminer, рассмотрите возможность пожертвования.', + 'The action will be performed after successful login with the same credentials.' => 'Действие будет выполнено после успешного входа в систему с теми же учетными данными.', + 'Connecting to privileged ports is not allowed.' => 'Подключение к привилегированным портам не допускается.', + 'There is a space in the input password which might be the cause.' => 'В введеном пароле есть пробел, это может быть причиною.', + 'Unknown error.' => 'Неизвестная ошибка.', + 'Database does not support password.' => 'База данных не поддерживает пароль.', ); From 5cab8eabb777b7a72ac549393cf305955927e6e3 Mon Sep 17 00:00:00 2001 From: Sartor Date: Wed, 29 Apr 2020 13:03:23 +0300 Subject: [PATCH 022/144] Fix PgSQL generated always as identity fix --- adminer/drivers/pgsql.inc.php | 6 +++--- changes.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 5466ed21b..8abcaba7b 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -350,7 +350,7 @@ function fields($table) { 'timestamp with time zone' => 'timestamptz', ); - $identity_column = min_version(10) ? "(a.attidentity = 'd')::int" : '0'; + $identity_column = min_version(10) ? 'a.attidentity' : '0'; foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, pg_get_expr(d.adbin, d.adrelid) AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, $identity_column AS identity FROM pg_class c @@ -375,8 +375,8 @@ function fields($table) { $row["type"] = $type; $row["full_type"] = $row["type"] . $length . $addon . $array; } - if ($row['identity']) { - $row['default'] = 'GENERATED BY DEFAULT AS IDENTITY'; + if (in_array($row['identity'], array('a', 'd'))) { + $row['default'] = 'GENERATED ' . ($row['identity'] == 'd' ? 'BY DEFAULT' : 'ALWAYS') . ' AS IDENTITY'; } $row["null"] = !$row["attnotnull"]; $row["auto_increment"] = $row['identity'] || preg_match('~^nextval\(~i', $row["default"]); diff --git a/changes.txt b/changes.txt index 7fa7ad50d..d3ddbdd5e 100644 --- a/changes.txt +++ b/changes.txt @@ -2,6 +2,7 @@ Adminer 4.7.9-dev: Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) +PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06): From b558ec8ecf48d2090cee58415852fb79be487300 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 12:30:39 +0100 Subject: [PATCH 023/144] Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) --- adminer/dump.inc.php | 3 ++- changes.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index f6e9a48b1..998cce889 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -22,7 +22,8 @@ " . ($_POST["data_style"] ? "SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; " : "") . " "; - $connection->query("SET time_zone = '+00:00';"); + $connection->query("SET time_zone = '+00:00'"); + $connection->query("SET sql_mode = ''"); } } diff --git a/changes.txt b/changes.txt index d3ddbdd5e..ec16cd748 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.7.9-dev: Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 +MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) From 7c4718ae3dd4a106a0d294358105b0ca29b7e910 Mon Sep 17 00:00:00 2001 From: Lucas Sandery Date: Sun, 3 May 2020 15:37:07 +0930 Subject: [PATCH 024/144] Fixes to lucas-sandery theme --- designs/lucas-sandery/adminer.css | 135 ++++++++++++++++++++++++------ 1 file changed, 110 insertions(+), 25 deletions(-) diff --git a/designs/lucas-sandery/adminer.css b/designs/lucas-sandery/adminer.css index 128bad6b6..b128fce3b 100644 --- a/designs/lucas-sandery/adminer.css +++ b/designs/lucas-sandery/adminer.css @@ -1,6 +1,6 @@ /* -A colourful RTL-friendly theme. -Update from https://github.com/vrana/adminer/raw/master/designs/lucas-sandery/adminer.css +A colourful, RTL-friendly theme. +Update from https://github.com/lucas-sandery/adminer/raw/master/designs/lucas-sandery/adminer.css Icons from http://FlatIcon.com: "Translation" by Freepik @@ -13,7 +13,7 @@ Icons from http://FlatIcon.com: "Forbidden Mark" by Pavel Kozlov "Search" by Freepik -Background from "All Work and No Play", http://thenewcode.com/1008/SVG-Movie-Backgrounds-Andys-Room-and-Overlook-Hotel +Background adapted from "All Work and No Play", http://thenewcode.com/1008/SVG-Movie-Backgrounds-Andys-Room-and-Overlook-Hotel */ html { height: 100%; @@ -23,6 +23,7 @@ body { min-height: 100%; display: flex; background: #41658a; + box-sizing: border-box; } p { margin-right: 0; @@ -133,6 +134,9 @@ thead a:visited:focus, .message p > a:visited:focus { color: #f39561; } +pre { + overflow-x: auto; +} code.jush-sql { display: inline-block; padding: 0.3em 0.5em 0.2em; @@ -164,6 +168,11 @@ th > code { .footer { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340.6 491.8' width='56px' height='81px'%3E%3Cpolygon fill='%2370a37f' fill-opacity='0.05' points='229.9,208.7 170.5,243 111,208.7 111,140 170.5,105.7 229.9,140'/%3E%3Cpolygon fill='%2370a37f' fill-opacity='0.05' points='0,305.3 59.5,339.6 59.5,408.3 0,442.6'/%3E%3Cpolygon fill='%2370a37f' fill-opacity='0.05' points='342.8,442.6 283.3,408.3 283.3,339.6 342.8,305.3'/%3E%3Cpolygon fill='%2379b473' fill-opacity='0.05' points='91.6,0 0,52.9 0,0'/%3E%3Cpolygon fill='%2379b473' fill-opacity='0.05' points='340.6,0 340.6,52.9 248.8,0'/%3E%3Cpolygon fill='%2379b473' fill-opacity='0.05' points='21.4,264.6 102.8,311.6 102.8,431.7 -1.2,491.8 0,544.5 149.7,458.1 149.1,285.1 68.2,236.7 68.2,116.6 172.2,56.5 276.2,116.6 276.2,236.7 192.5,285 192.5,337.1 192.5,337.1 192.5,458.1 342.2,544.5 341,491.8 237,431.7 237,311.6 320.8,263.3 320.8,90.2 171.1,3.8 21.4,90.2'/%3E%3C/svg%3E") fixed; } +@supports (-ms-ime-align: auto) { + .footer { + background: #fff; + } +} .scrollable { overflow: auto; } @@ -202,6 +211,7 @@ h2 { padding: 2em 20px 0.5em; border-bottom-style: none; color: #fff; + overflow-wrap: break-word; } h1, h2, @@ -247,7 +257,7 @@ input.required { } table { border-style: none; - background: rgba(255, 255, 255, 0.8); + background: rgba(255, 255, 255, 0.6); } td, th { @@ -275,20 +285,27 @@ thead th, thead td { border-color: #fff; padding: 0.5em 0.8em 0.6em; - background: #414073; color: #fff; } thead th { text-align: left; font-weight: normal; } +.js .checkable thead .checked th, +thead th { + background: #414073; + position: relative; + background-clip: padding-box; +} .rtl thead th { text-align: right; } +.js .checkable thead .checked td, thead td { background: #41658a; } .js .column { + z-index: 1; background: transparent; padding: 0; margin-top: 0; @@ -325,20 +342,20 @@ tbody tr:nth-child(n):hover td { tbody tr:nth-child(n):hover th { background: rgba(236, 72, 18, 0.2); } -.js .checkable .checked td { +.js .checkable tbody .checked td { background: rgba(236, 72, 18, 0.25); } -.js .checkable .checked:nth-child(even) td, -.js .checkable .checked th { +.js .checkable tbody .checked:nth-child(even) td, +.js .checkable tbody .checked th { background: rgba(236, 72, 18, 0.3); } -.js .checkable .checked:nth-child(even) th { +.js .checkable tbody .checked:nth-child(even) th { background: rgba(236, 72, 18, 0.35); } -.js .checkable .checked:hover td { +.js .checkable tbody .checked:hover td { background: rgba(236, 72, 18, 0.4); } -.js .checkable .checked:hover th { +.js .checkable tbody .checked:hover th { background: rgba(236, 72, 18, 0.45); } .icon { @@ -368,12 +385,9 @@ tbody tr:nth-child(n):hover th { .column a[href="#fieldset-search"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 310.088 310.088' enable-background='new 0 0 310.088 310.088' width='512px' height='512px'%3E%3Cg%3E%3Cpath d='m299.85,250.413l-62.808-62.808c-3.982-3.982-10.437-3.982-14.418,0l-3.539,3.539-18.586-18.586c29.709-42.872 25.472-102.152-12.716-140.34-42.958-42.958-112.606-42.958-155.563,0s-42.958,112.606 0,155.563c38.189,38.188 97.468,42.425 140.34,12.716l18.586,18.586-3.539,3.539c-3.982,3.981-3.982,10.437 0,14.418l62.808,62.808c13.651,13.651 35.785,13.651 49.436,0s13.65-35.784-0.001-49.435zm-251.368-78.895c-33.921-33.921-33.921-89.115-0.001-123.036 33.922-33.921 89.117-33.922 123.037-0.001v0.001c33.922,33.921 33.922,89.115 0,123.036-16.96,16.961-39.239,25.441-61.518,25.441-22.279,0-44.558-8.48-61.518-25.441z' fill='%23FFFFFF'/%3E%3C/g%3E%3C/svg%3E"); } -.loadmore { - margin-right: -0.4em; -} +.loadmore, .rtl .loadmore { - margin-right: 0; - margin-left: -0.4em; + margin: 0; } .footer { margin: 0; @@ -386,6 +400,9 @@ tbody tr:nth-child(n):hover th { background: transparent; padding: 0; } +.footer ~ div { + margin-top: 0.8em; +} #lang, .logout { z-index: 3; @@ -394,6 +411,7 @@ tbody tr:nth-child(n):hover th { overflow: hidden; width: 2em; height: 2em; + position: fixed; } #lang { left: 18em; @@ -403,8 +421,6 @@ tbody tr:nth-child(n):hover th { } .rtl .logout { margin: 0; - left: 0; - right: auto; } #lang select, #logout { @@ -417,8 +433,8 @@ tbody tr:nth-child(n):hover th { cursor: pointer; z-index: 1; } -#lang:after, -.logout:after { +#lang:before, +.logout:before { position: absolute; top: 0; left: 0; @@ -430,15 +446,16 @@ tbody tr:nth-child(n):hover th { background: #2d3047 center no-repeat; background-size: 70%; } -#lang:after { +#lang:before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 470 470' enable-background='new 0 0 470 470' width='512px' height='512px'%3E%3Cg%3E%3Cpath d='m432.5,227.5h-77.031c-0.611-37.438-5.782-73.616-14.771-105.694h50.518c4.143,0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-55.112c-8.018-24.165-18.316-45.521-30.553-62.656-2.408-3.371-7.093-4.153-10.462-1.745-3.371,2.407-4.152,7.092-1.745,10.462 10.618,14.868 19.688,33.199 26.965,53.939h-77.809v-69.306c0-4.143-3.357-7.5-7.5-7.5s-7.5,3.357-7.5,7.5v69.306h-77.81c7.277-20.74 16.347-39.071 26.965-53.939 2.407-3.37 1.626-8.055-1.745-10.462-3.372-2.407-8.055-1.625-10.462,1.745-12.237,17.135-22.535,38.492-30.553,62.656h-55.112c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5 7.5,7.5h50.518c-8.988,32.078-14.159,68.256-14.771,105.694h-77.03c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5 7.5,7.5h77.031c0.611,37.438 5.782,73.616 14.771,105.694h-50.519c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5 7.5,7.5h55.112c8.019,24.169 18.32,45.529 30.56,62.666 1.464,2.049 3.77,3.142 6.11,3.142 1.508,0 3.031-0.454 4.353-1.397 3.37-2.408 4.151-7.092 1.744-10.463-10.621-14.869-19.693-33.204-26.972-53.947h77.81v69.305c0,4.143 3.357,7.5 7.5,7.5s7.5-3.357 7.5-7.5v-69.306h77.81c-7.278,20.744-16.351,39.078-26.972,53.947-2.407,3.371-1.626,8.055 1.744,10.463 1.321,0.943 2.844,1.397 4.353,1.397 2.341,0 4.646-1.093 6.11-3.142 12.24-17.137 22.54-38.497 30.56-62.666h55.112c4.143,0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-50.519c8.989-32.078 14.16-68.256 14.771-105.694h77.031c4.143,0 7.5-3.357 7.5-7.5s-3.357-7.499-7.5-7.499zm-107.36-105.694c9.313,31.683 14.695,67.958 15.326,105.694h-97.966v-105.694h82.64zm-180.28,0h82.64v105.694h-97.966c0.632-37.737 6.013-74.011 15.326-105.694zm0,226.388c-9.313-31.683-14.695-67.958-15.326-105.694h97.966v105.694h-82.64zm180.28,0h-82.64v-105.694h97.966c-0.632,37.737-6.013,74.012-15.326,105.694z' fill='%23ECEBE4'/%3E%3Cpath d='M401.17,68.83C356.784,24.444,297.771,0,235,0S113.216,24.444,68.83,68.83S0,172.229,0,235.001 c0,46.271,13.391,90.899,38.764,129.316l-28.718,86.148c-0.898,2.695-0.197,5.667,1.812,7.676c2.009,2.008,4.979,2.708,7.676,1.812 l86.15-28.716C144.102,456.609,188.729,470,235,470c62.771,0,121.784-24.444,166.17-68.83S470,297.771,470,235.001 C470,172.229,445.556,113.216,401.17,68.83z M235,455c-44.491,0-87.355-13.222-123.961-38.235 c-1.262-0.862-2.739-1.308-4.231-1.308c-0.797,0-1.598,0.127-2.372,0.385L29.02,440.979l25.14-75.414 c0.741-2.225,0.399-4.668-0.923-6.604C28.222,322.357,15,279.492,15,235.001C15,113.692,113.691,15,235,15s220,98.692,220,220.001 C455,356.309,356.309,455,235,455z' fill='%23ECEBE4'/%3E%3C/g%3E%3C/svg%3E"); } -.logout:after { +.logout:before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 512 512' enable-background='new 0 0 512 512' width='512px' height='512px'%3E%3Cg%3E%3Cpath d='m256,501c-129.6,0-235-102.2-235-227.8 0-87.8 50.6-166.3 132.1-204.9 10.2-4.8 22.4-0.5 27.2,9.7 4.8,10.2 0.5,22.4-9.7,27.2-67.1,31.8-108.7,96.1-108.7,168-7.10543e-15,103.1 87.1,187 194.1,187 107,0 194.1-83.9 194.1-187 0-72.4-44-138.9-112.2-169.5-10.3-4.6-14.9-16.7-10.3-27 4.6-10.3 16.7-14.9 27-10.2 82.9,37.1 136.4,118.3 136.4,206.7 0,125.6-105.4,227.8-235,227.8z' fill='%23FFFFFF'/%3E%3Cpath d='m256,287.9c-11.3,0-20.4-9.1-20.4-20.4v-236.1c0-11.3 9.2-20.4 20.4-20.4 11.3,0 20.4,9.1 20.4,20.4v236.1c0,11.3-9.1,20.4-20.4,20.4z' fill='%23FFFFFF'/%3E%3C/g%3E%3C/svg%3E"); } -/* need a real element for :focus ~ styling */ -#lang:hover:after, -.logout:hover:after { +#lang:focus-within:before, +#lang:hover:before, +.logout:focus-within:before, +.logout:hover:before { background-color: #ec5f12; } #menu { @@ -447,6 +464,7 @@ tbody tr:nth-child(n):hover th { width: auto; flex: 0 0 20em; max-width: 20em; + z-index: 1; } h1 { background: #414073; @@ -526,6 +544,70 @@ button:disabled { background-color: rgba(76, 57, 87, 0.35); cursor: not-allowed; } +input[type="file"]::-ms-browse { + display: inline-block; + font-size: 85%; + text-align: center; + background: #4c3957; + color: #fff; + padding: 0.5em 0.8em 0.6em; + margin: 0; + border-style: none; + cursor: pointer; +} +input[type="file"]:hover::-ms-browse, +input[type="file"]:focus::-ms-browse { + color: #fff; + background: #ec5f12; + text-decoration: none; +} +input[type="file"]:disabled::-ms-browse { + background-color: rgba(76, 57, 87, 0.35); + cursor: not-allowed; +} +input[type="file"]::-webkit-file-upload-button { + -webkit-appearance: none; + display: inline-block; + font-size: 85%; + text-align: center; + background: #4c3957; + color: #fff; + padding: 0.5em 0.8em 0.6em; + margin: 0; + border-style: none; + cursor: pointer; +} +input[type="file"]:hover::-webkit-file-upload-button, +input[type="file"]:focus::-webkit-file-upload-button { + color: #fff; + background: #ec5f12; + text-decoration: none; +} +input[type="file"]:disabled::-webkit-file-upload-button { + background-color: rgba(76, 57, 87, 0.35); + cursor: not-allowed; +} +input[type="file"]::-moz-file-upload-button { + display: inline-block; + font-size: 85%; + text-align: center; + background: #4c3957; + color: #fff; + padding: 0.5em 0.8em 0.6em; + margin: 0; + border-style: none; + cursor: pointer; +} +input[type="file"]:hover::-moz-file-upload-button, +input[type="file"]:focus::-moz-file-upload-button { + color: #fff; + background: #ec5f12; + text-decoration: none; +} +input[type="file"]:disabled::-moz-file-upload-button { + background-color: rgba(76, 57, 87, 0.35); + cursor: not-allowed; +} .links .active { font-weight: normal; background-color: #414073; @@ -679,6 +761,9 @@ button:disabled { -o-box-decoration-break: clone; box-decoration-break: clone; } + .logout { + position: absolute; + } #lang { margin-left: auto; position: relative; From 6f972ff9abc512ab9220d481bee4ba14a5929456 Mon Sep 17 00:00:00 2001 From: shiipou Date: Thu, 14 May 2020 15:05:52 +0000 Subject: [PATCH 025/144] Add external designs as submodules --- .gitmodules | 6 ++++++ designs/hydra | 1 + designs/pepa-linha-dark | 1 + 3 files changed, 8 insertions(+) create mode 160000 designs/hydra create mode 160000 designs/pepa-linha-dark diff --git a/.gitmodules b/.gitmodules index 63ed77094..5810a5e7a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,9 @@ [submodule "JsShrink"] path = externals/JsShrink url = git://github.com/vrana/JsShrink +[submodule "designs/hydra"] + path = designs/hydra + url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer +[submodule "designs/pepa-linha-dark"] + path = designs/pepa-linha-dark + url = https://github.com/pepa-linha/Adminer-Design-Dark/ diff --git a/designs/hydra b/designs/hydra new file mode 160000 index 000000000..afcef61f6 --- /dev/null +++ b/designs/hydra @@ -0,0 +1 @@ +Subproject commit afcef61f666286f530b0de375e33a29fc3ab5be2 diff --git a/designs/pepa-linha-dark b/designs/pepa-linha-dark new file mode 160000 index 000000000..81eb3c487 --- /dev/null +++ b/designs/pepa-linha-dark @@ -0,0 +1 @@ +Subproject commit 81eb3c48708b0132977d63a1948920cc1cefdefa From 96be9139944c981717d85c3aae847aedeab5e3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Mas=C3=A1r?= Date: Sun, 31 May 2020 23:40:51 +0200 Subject: [PATCH 026/144] PostgreSQL: Fix current schema in view definition --- adminer/drivers/pgsql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 8abcaba7b..409f64a00 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -455,7 +455,7 @@ function constraints($table) { function view($name) { global $connection; - return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . $connection->result("SELECT oid FROM pg_class WHERE relname = " . q($name)) . ")"))); + return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . $connection->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($name)) . ")"))); } function collations() { diff --git a/changes.txt b/changes.txt index ec16cd748..9502f6dc6 100644 --- a/changes.txt +++ b/changes.txt @@ -3,6 +3,7 @@ Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) +PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) Re-enable PHP warnings (regression from 4.7.8) From 1ce0a9aa94c988f44712093b357ab26aa24ee0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Tu=C5=A1la?= Date: Tue, 9 Jun 2020 20:17:12 +0200 Subject: [PATCH 027/144] show correct collation for PostgresSQL --- adminer/drivers/pgsql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 409f64a00..7437aa435 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -292,7 +292,7 @@ function limit1($table, $query, $where, $separator = "\n") { function db_collation($db, $collations) { global $connection; - return $connection->result("SHOW LC_COLLATE"); //! respect $db + return $connection->result("SELECT datcollate FROM pg_database WHERE datname = " . q($db)); } function engines() { From eb20ba30a17830e08f7dc89ad3b5bab59bb93c99 Mon Sep 17 00:00:00 2001 From: Douglas Damasio Date: Fri, 19 Jun 2020 03:13:44 -0300 Subject: [PATCH 028/144] add alternative design dracula theme --- designs/dracula/adminer.css | 729 ++++++++++++++++++++++++++++++++++++ 1 file changed, 729 insertions(+) create mode 100644 designs/dracula/adminer.css diff --git a/designs/dracula/adminer.css b/designs/dracula/adminer.css new file mode 100644 index 000000000..40bfc12a8 --- /dev/null +++ b/designs/dracula/adminer.css @@ -0,0 +1,729 @@ +/* + * Theme by Douglas Damasio [http://github.com/douglasdamasio] + * Based on Pepa Linha + * Color syntax inspired by Dracula Theme [https://draculatheme.com/] + * @version 1.0 (June 2020) + */ + @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&family=Ubuntu:wght@500;700&display=swap'); + + :root { + --color-darkBackground: #282a36; + --color-darkCurrentLine: #44475a; + --color-darkForeground: #f8f8f2; + --color-darkComment: #6272a4; + --color-darkCyan: #8be9fd; + --color-darkGreen: #50fa7b; + --color-darkOrange: #ffb86c; + --color-darkPink: #ff79c6; + --color-darkPurple: #bd93f9; + --color-darkRed: #ff5555; + --color-darkYellow: #f1fa8c; + + --color-darkTitleSite: #bcc2cd; + --color-darkDraculaSite: #383a59; + --color-darkDraculaVSCode: #22222c; +} + html, + body { + height: 100%; + background: var(--color-darkBackground); + } + + body { + font-family: 'Source Sans Pro', sans-serif; + } + + div { + color: var(--color-darkForeground); + } + + h1 { + margin: 0; + padding: 0; + background: none; + border: 0; + } + + h2 { + margin: 0; + padding: 0; + background: none; + border: 0; + font-family: 'Ubuntu', sans-serif; + font-size: 32px; + font-weight: 700; + color: var(--color-darkPink); + border-bottom: 1px solid var(--color-darkComment); + padding-bottom: 6px; + margin-bottom: 40px; + } + + .rtl h2 { + margin: 0; + margin-bottom: 40px; + } + + h3 { + font-size: 22px; + margin: 0 0 10px; + border-bottom: 1px solid var(--color-darkComment); + padding: 0; + padding-bottom: 6px; + color: var(--color-darkGreen); + + } + + p { + margin: 0; + margin-bottom: 15px; + align-items: center; + color: var(--color-darkForeground); + } + + a { + color:var(--color-darkPink); + text-decoration:none; + } + + a:visited { + color: var(--color-darkPurple); + } + + a:link:hover, + a:visited:hover { + color: var(--color-darkPink); + text-decoration:underline; + } + + + a[href*=charsets] { + display: none; + } + + table { + border: 0; + margin: 0; + margin-top: 15px; + } + + th, td { + border: 0; + padding: 6px; + color: var(--color-darkOrange); + } + + th { + background: none; + color: var(--color-darkCyan); + font-weight: normal; + } + + tbody tr:hover td, + tbody tr:hover th { + background: var(--color-darkCurrentLine); + } + + table:not(.checkable) th { + min-width: 120px; + } + + thead td, + thead th { + background: var(--color-darkComment); + } + + thead td, + thead td a, + thead td a:link:hover, + thead td a:visited, + thead td a:visited:hover, + thead th, + thead th a, + thead th a:link:hover, + thead th a:visited, + thead th a:visited:hover { + color: var(--color-darkForeground); + } + + table.checkable, + p.links + table, + pre + table, + #edit-fields, + p + table, + h3 + table { + border: 1px solid var(--color-darkCurrentLine); + margin-bottom: 15px; + } + + table.checkable tbody tr:hover td, + table.checkable tbody tr:hover th { + background: var(--color-darkCurrentLine); + } + + .js .checkable .checked td, + .js .checkable .checked th { + background: var(--color-darkDraculaSite); + } + + .js .checkable thead .checked td, + .js .checkable thead .checked th { + background: var(--color-darkPurple); + } + + .odd th, + .odd td { + background: var(--color-darkDraculaVSCode); + } + + fieldset { + display: inline-block; + padding: 15px; + padding-top: 5px; + margin: 0 0 15px; + border: 0; + background: var(--color-darkBackground); + } + + fieldset select { + margin-right: 5px; + } + + fieldset input[type=button], + fieldset input[type=submit], + fieldset p { + margin-bottom: 0; + } + + fieldset div p { + margin-top: 10px; + } + + legend { + display: inline-block; + padding: 6px 15px; + margin: 0 0 0 -15px; + background: var(--color-darkDraculaSite); + font-family: 'Source Sans Pro', sans-serif; + color: var(--color-darkOrange); + } + + legend a, + legend a:link:hover { + color: var(--color-darkOrange); + text-decoration: underline; + } + + code { + background: none; + } + + p code, + pre code, + pre[contenteditable=true] { + padding: 10px 15px; + display: block; + font-size: 17px; + margin-bottom: 15px; + } + + p code + a, + p code + a:link:hover, + p code + a:visited:hover { + margin-left: 15px; + position: relative; + top: -20px; + color: var(--color-darkOrange); + font-size: 12px; + text-decoration: underline; + text-transform: lowercase; + } + + #content { + margin: 0; + margin-left: 400px; + margin-right: 54px; + padding: 0; + padding-top: 50px; + } + + #content > p { + margin-bottom: 15px; + color: var(--color-darkForeground); + } + + .rtl #content { + margin: 0; + margin-left: 54px; + margin-right: 400px; + padding: 0; + padding-top: 50px; + } + + #menu { + width: 347px; + border-right: 1px solid var(--color-darkBackground); + box-shadow: inset -1px 0 0 #000000b4; + margin: 0; + padding: 0; + top: 0; + background: var(--color-darkDraculaVSCode); + bottom: 0; + position: fixed; + padding: 0 15px; + box-sizing: border-box; + } + + #menu h1 { + background: none left top no-repeat; + /* background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAyCAIAAABgVkRrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTA0RDI5NkM5QkRGMTFFMzg4ODNEQjEzNjY5NzJEMEEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTA0RDI5NkQ5QkRGMTFFMzg4ODNEQjEzNjY5NzJEMEEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1MDREMjk2QTlCREYxMUUzODg4M0RCMTM2Njk3MkQwQSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1MDREMjk2QjlCREYxMUUzODg4M0RCMTM2Njk3MkQwQSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnG4emkAAASXSURBVHja7Fk9aNtAFL6EDKKUoqGDySRKB1FC8dDBdCgeOmQoIUMG0yGE0EFT8dDBUwidPJQQQgcNpYROGjKI0sFDB9GhaMhgSgcPpWgqHjqYYsINJfQ7PfV0tmX9JI4Sgx+HI8f26bt3733fe6elIf/LbqwdHbJWS1wYBrMstrXJVg36ZJnNhQWBWMB9k+215gq3tDeHBH3pRseJtC8ee2ezEzd62+ncDH/DhS+ttC88qbMPDntaj952uyvXD3q7ETvyyE77pq5HFz9614r7V8C2GnBezBgp9tGNl3ffzIjvwZ9B//dA7Mz3YPLTyl29UhE+MI0KW9YKh2yjwQZichEAjsNu6WlUqNqkvwHUO+0BJeD2gn4hJFXTwAIw6jUzYxlwHkCTvWqy1+0Ct7FtsPh/3Ofc9brOJ5+8ezHr9gKMcGpWf2SK8bhKk48sA1kIOiODmzc2c8U0DLrzwhI5ypjA3fsZtNrOgPP4y5pmGJXamqHd1kQMTIkENYpwEfQHEW7GsGkYZse393ewb+Y9IwE0PJcOejQ2pFgK3Li3BI14hZM269XKaiXPVPodHUOs6l48o/+t5wO038OcQGztHzd31uPfUEgQdCQi3JkfumLLHa9LoK2tunPQtJ6v5wQ9zWoPzebupms34QKxmZNJAugIDzJE+V4rbTrDSMYtr3AD+H5WFIfZ0lIFPu50otiF7zfW2dlgquKccTFWRxYQ8wlFJOVTdc2gAChq/V99vxdgD7O5CIBO/Yi/P3vsUY2dOOxBdSrzIBm2dxJwq+hlaiId9dua5OlEv/IhH0vKvAYXfvUjvUTFB2STeinJu91Oxo3Eh58onwRXcB7zWkGj/Maa9203+9soPIyWEKBEkQdc8veo+sS4wQkYzV1Bi+A1Ee5DnhO33BxsSw1/wszGPHkXmqI7yIQzPvnvhPqEFjAWtSq7j7n2YplwSctVV8F/FXazbN76nQXu68btfe3Odmqwahl5Ca6tel0UVdnVc6pRBX/JkrgYn0RCY0cdAMhYvGYxHbEklbJ++FoqD8LTUiwTlZLEha55WKOmSybWTCXD1eJG8dnc4XAYqmdgmoRFyp/ZqqHbgMiD8qGXZeAOs1RD9YyhBgBVTgL3cMTHwKd2xyUL50qmTI5p/oK/F7jnEjeycLZTFz02SrKlaSPGbe0fOx+9mbTGcMHhe/fwuFMGn4Dy7BMPA3oBGkZrbIDgcp9JgK37YYtZjmSuqApH9yPRcTp+TM939THOpkaYroMguRuSE14tbuegif11vS58poYm7i1vn6fdxF6hMoNk4leIvTJ0B1FhPQ/PxM45eZ2HGjkY8jHXqptghGJJqqmKVHn1oCr4k93xgr8XuOcZ9zmf7dQym68Et6QFcFaBk7EsQ5fdfuteHW7xPM3asyVh05EkxFJITMHuGDUCukxwvOz3YI31mtWoX7TRXkrDjQhBLeFOHBtQQ6n/f8TDlAd/6mNBP7xO7Ecbz2qNjfrl6qoU3Mr5Qa4j9yyLHqZd7jwjL241QQFdPiJTdT7RsBuapslzi5mqVSHcKXYetcZlSelU3P8EGADW25uhkIE0mQAAAABJRU5ErkJggg==); */ + background-image: url(); + line-height: 50px; + padding-left: 50px; + padding-top: 9px; + /* text-transform: lowercase; */ + margin: 25px 0 10px 16px; + } + + + #menu h1 a { + font-style: normal; + } + + #menu h1 .version { + color: var(--color-darkPurple); + } + + #menu a { + color: var(--color-darkForeground); + } + + #menu p, #tables { + border: 0; + padding: 0; + } + + #menu #dbs { + background: var(--color-darkDraculaVSCode); + padding: 0 15px 15px; + border: 1px solid var(--color-darkForeground); + border-bottom: 0; + box-sizing: border-box; + color: var(--color-darkCyan); + } + + #menu #dbs select { + outline: 0; + border-color: var(--color-darkComment); + width: 100%; + } + + #menu p.links { + margin: 0 0 15px; + border: 1px solid var(--color-darkForeground); + border-top: 0; + text-align: center; + display: table; + width: 100%; + box-sizing: border-box; + } + + #menu p.links a { + padding: 8px; + margin: 0; + display: table-cell; + font-size: 12px; + } + + #menu p.links a:hover { + color: var(--color-darkPink); + } + + #menu p.links a.active { + font-weight: normal; + background: var(--color-darkCurrentLine); + color: var(--color-darkYellow); + } + + #content p.links { + margin: -10px 0 15px; + } + + #content p.links a { + padding: 8px; + margin: 0; + display: table-cell; + border: 1px solid var(--color-darkBackground); + } + + #content p.links a, + #content p.links a:visited, + #content p.links a:hover { + color: var(--color-darkCyan); + } + + #content p.links a.active { + font-weight: normal; + border: 1px solid var(--color-darkTitleSite); + background: var(--color-darkCurrentLine); + } + + #tables { + max-height: 100%; + margin: 32px -15px !important; + position: absolute; + left: 15px; + right: 15px; + bottom: 0; + top: 220px; + overflow: hidden !important; + overflow-y: auto !important; + } + + .rtl #tables { + overflow: hidden !important; + overflow-y: auto !important; + } + + #tables a { + float: right; + padding: 6px 15px; + } + + .rtl #tables a { + float: none; + } + + #tables a[title] { + float: none; + display: block; + } + + .rtl #tables a:first-child, + .rtl #tables br + a { + float: left; + display: block; + margin-left: 15px; + } + + #tables a:hover, + #tables a:hover + a, + #tables a.active, + #tables a.active + a { + background: var(--color-darkBackground); + color: var(--color-darkPink); + } + + #tables br { + display: none; + } + + .js .column { + background: var(--color-darkDraculaVSCode); + } + + .js .checked .column { + background: var(--color-darkDraculaVSCode); + } + + .pages { + left: 400px; + background: var(--color-darkCyan); + color: var(--color-darkBackground); + font-weight: bold; + border: 0; + display: inline-block; + position: static; + } + + .pages a, + .pages a:link, + .pages a:link:hover, + .pages a:visited, + .pages a:visited:hover { + color: var(--color-darkBackground); + font-weight: normal; + } + + #breadcrumb { + margin: 0; + left: 400px; + background: none; + padding: 0; + padding-top: 25px; + font-size: 12px; + } + + #breadcrumb a { + color: var(--color-darkForeground); + text-decoration: underline; + } + + #breadcrumb, + #breadcrumb a:hover { + color: var(--color-darkTitleSite); + } + + .rtl #breadcrumb { + margin: 0; + padding: 0; + padding-top: 25px; + right: 400px; + } + + .logout, + .rtl .logout { + top: 30px; + right: 54px; + margin: 0; + } + + .rtl .logout { + right: auto; + left: 54px; + } + + input:not([type]), + input[type="color"], + input[type="email"], + input[type="number"], + input[type="password"], + input[type="tel"], + input[type="url"], + input[type="text"], + input[type="search"] { + border: 1px solid var(--color-darkCurrentLine); + background-color: var(--color-darkBackground); + padding: 6px; + margin: 0; + box-sizing: border-box; + color: var(--color-darkForeground); + } + + table:not(#table) input:not([type]), + table:not(#table) input[type="color"], + table:not(#table) input[type="email"], + table:not(#table) input[type="number"], + table:not(#table) input[type="password"], + table:not(#table) input[type="tel"], + table:not(#table) input[type="url"], + table:not(#table) input[type="text"], + table:not(#table) input[type="search"] { + min-width: 280px; + } + + input[type=submit], + input[type=button] { + border: 0; + padding: 7px 12px; + cursor: pointer; + outline: 0; + box-shadow: none; + background: var(--color-darkGreen); + color: var(--color-darkBackground); + font-weight: bold; + margin-bottom: 5px; + transition: background .4s ease; + border-radius: 5px; + margin-top: 20px; + } + + input[type=submit][disabled], + input[type=button][disabled] { + background: var(--color-darkTitleSite) !important; + color: var(--color-darkBackground); + cursor: not-allowed; + } + + input[type=submit]:hover, + input[type=button]:hover, + input[type=submit]:focus, + input[type=button]:focus { + background: var(--color-darkGreen); + opacity: 0.8; + } + + .logout input[type=submit] { + background: var(--color-darkRed); + color: var(--color-darkForeground); + } + + .logout input[type=submit]:hover { + background: var(--color-darkRed); + opacity: 0.8; + } + + input.default, + input.default { + box-shadow: none; + background: var(--color-darkGreen); + color: var(--color-darkDraculaVSCode); + font-weight: bold; + } + + select { + box-sizing: border-box; + margin: 0; + padding: 6px 0; + border: 1px solid var(--color-darkCurrentLine); + background-color: var(--color-darkBackground); + color: var(--color-darkForeground); + } + + label { + cursor: pointer; + margin: 18px; + color: var(--color-darkOrange); + } + + .error, + .message { + margin: 0; + margin-bottom: 15px; + background: var(--color-darkCurrentLine); + color: var(--color-darkRed); + } + + #logins a, + #tables a, + #tables span { + background: none; + } + + #form > p { + margin-bottom: 15px; + color: var(--color-darkForeground); + } + + + #schema .table { + padding: 6px; + } + + #schema .table a { + display: block; + margin: -6px; + margin-bottom: 6px; + padding: 6px; + color: var(--color-darkBackground); + background: var(--color-darkPurple); + } + + #schema .table br { + display: none; + } + + #schema .table span { + display: block; + margin-bottom: 1px solid var(--color-darkDraculaVSCode); + } + + #lang { + position: fixed; + top: 55px; + right: 100%; + z-index: 10; + margin-right: -340px; + line-height: normal; + padding: 0; + left: auto; + font-size: 0; + } + + #lang select { + font-size: 12px; + padding: 0; + text-align: right; + border: 0; + background: none; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + cursor: pointer; + outline: 0; + } + + #lang select option { + text-align: right; + } + + .rtl #lang { + margin-right: 0; + left: 100%; + margin-left: -261px; + right: auto; + } + + .jush { + color: var(--color-darkForeground); + } + + .jush a { + color: var(--color-darkPurple); + } + + .jush-sql a, + .jush-sql_code a, + .jush-sqlite a, + .jush-pgsql a, + .jush-mssql a, + .jush-oracle a, + .jush-simpledb a { + font-weight: normal; + } + + .jush-bac, + .jush-php_bac, + .jush-bra, + .jush-mssql_bra, + .jush-sqlite_quo { + color: var(--color-darkYellow); + } + + .jush-php_quo, + .jush-quo, + .jush-quo_one, + .jush-php_eot, + .jush-apo, + .jush-sql_apo, + .jush-sqlite_apo, + .jush-sql_quo, + .jush-sql_eot { + color: var(--color-darkOrange); + } + + .jush-num, + .jush-clr { + color: var(--color-darkPurple); + } + + @media print { + .logout { + display: none; + } + + #breadcrumb { + position: static; + } + + #content { + margin: 0; + } + } + + .footer { + position: sticky; + bottom: 0; + margin-right: -20px; + border-top: 20px solid var(--color-darkBackground); + border-image: var(--color-darkBackground) 100% 0; + border-image-source: var(--color-darkBackground); + border-image-slice: 100% 0; + border-image-width: 1; + border-image-outset: 0; + border-image-repeat: stretch; +} + + .footer > div { + background: var(--color-darkBackground); + padding: 0 0 .5em; +} From 84063fb7cd28b06eeebad0a3aa2ce703527e4820 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 14:33:49 +0100 Subject: [PATCH 029/144] Update Korean translation (thanks to B. Cansmile Cha) --- adminer/lang/ko.inc.php | 485 +++++++++++++++++++++------------------- 1 file changed, 249 insertions(+), 236 deletions(-) diff --git a/adminer/lang/ko.inc.php b/adminer/lang/ko.inc.php index f741db4da..6cd2a8bac 100644 --- a/adminer/lang/ko.inc.php +++ b/adminer/lang/ko.inc.php @@ -1,267 +1,280 @@ '로그인', - 'Logout successful.' => '로그아웃', - 'Invalid credentials.' => '잘못된 로그인', - 'Server' => '서버', - 'Username' => '사용자이름', - 'Password' => '비밀번호', - 'Select database' => '데이터베이스를 선택하십시오.', - 'Invalid database.' => '잘못된 데이터베이스입니다.', - 'Table has been dropped.' => '테이블을 삭제했습니다.', - 'Table has been altered.' => '테이블을 변경했습니다.', - 'Table has been created.' => '테이블을 만들었습니다.', + '$1-$3-$5' => '$1-$3-$5', + '%.3f s' => '%.3f 초', + '%d byte(s)' => '%d 바이트', + '%d e-mail(s) have been sent.' => '%d개 메일을 보냈습니다.', + '%d in total' => '총 %d개', + '%d item(s) have been affected.' => '%d개 항목을 갱신했습니다.', + '%d process(es) have been killed.' => '%d개 프로세스를 강제 종료하였습니다.', + '%d query(s) executed OK.' => '%d개 쿼리를 잘 실행했습니다.', + '%d row(s) have been imported.' => '%d개 행을 가져 왔습니다.', + '%d row(s)' => '%d개 행', + '%s version: %s through PHP extension %s' => '%s 버전 %s, PHP 확장 %s', + ',' => ',', + '0123456789' => '0123456789', + '[yyyy]-mm-dd' => '[yyyy]-mm-dd', + 'Action' => '실행', + 'Add column' => '열 추가', + 'Add foreign key' => '외부 키를 추가', + 'Add next' => '다음 추가', + 'Add trigger' => '트리거 추가', + 'Aggregation' => '집합', + 'Alter database' => '데이터베이스 변경', + 'Alter event' => '이벤트 변경', + 'Alter function' => '함수 변경', + 'Alter indexes' => '색인 변경', + 'Alter procedure' => '시저 변경', + 'Alter schema' => '스키마 변경', + 'Alter sequence' => '순서 변경', 'Alter table' => '테이블 변경', - 'Create table' => '테이블 만들기', - 'Table name' => '테이블 이름', - 'engine' => '엔진', + 'Alter trigger' => '트리거 변경', + 'Alter type' => '형 변경', + 'Alter view' => '보기 변경', + 'Alter' => '변경', + 'Analyze' => '분석', + 'anywhere' => '모든', + 'Are you sure?' => '실행 하시겠습니까?', + 'At given time' => '지정 시간', + 'Attachments' => '첨부 파일', + 'Auto Increment' => '자동 증가', + 'Binary' => '이진', + 'Call' => '호출', + 'Change' => '변경', + 'Check' => '확인', + 'Clear' => '삭제', + 'Clone' => '복제', 'collation' => '정렬', + 'Collation' => '정렬', + 'Column (length)' => '열 (길이)', 'Column name' => '열 이름', - 'Type' => '형', - 'Length' => '길이', - 'Auto Increment' => '자동증가', - 'Options' => '설정', - 'Save' => '저장', - 'Drop' => '삭제', - 'Database has been dropped.' => '데이터베이스를 삭제했습니다.', + 'Column' => '열', + 'Comment' => '주석', + 'Compute' => '계산하기', + 'Copy' => '복사', + 'Create database' => '데이터베이스 만들기', + 'Create event' => '만들기', + 'Create function' => '함수 만들기', + 'Create procedure' => '시저 만들기', + 'Create schema' => '스키마 추가', + 'Create sequence' => '시퀀스 만들기', + 'Create table' => '테이블 만들기', + 'Create trigger' => '트리거 만들기', + 'Create type' => '사용자 정의 형식 만들기', + 'Create user' => '사용자 만들기', + 'Create view' => '뷰 만들기', + 'Data Free' => '데이터 여유', + 'Data Length' => '데이터 길이', + 'Data' => '데이터', + 'Database has been altered.' => '데이터베이스를 변경했습니다.', 'Database has been created.' => '데이터베이스를 만들었습니다.', + 'Database has been dropped.' => '데이터베이스를 삭제했습니다.', 'Database has been renamed.' => '데이터베이스의 이름을 바꾸었습니다.', - 'Database has been altered.' => '데이터베이스를 변경했습니다.', - 'Alter database' => '데이터베이스 변경', - 'Create database' => '데이터베이스 만들기', - 'SQL command' => 'SQL 명령', - 'Logout' => '로그아웃', + 'Database schema' => '데이터베이스 구조', 'database' => '데이터베이스', - 'Use' => '사용', - 'No tables.' => '테이블이 없습니다.', - 'select' => '선택', - 'Item has been deleted.' => '항목을 삭제했습니다.', - 'Item has been updated.' => '항목을 갱신했습니다.', - 'Edit' => '편집', - 'Insert' => '삽입', - 'Save and insert next' => '저장하고 다음에 추가', - 'Delete' => '삭제', 'Database' => '데이터베이스', - 'Routines' => '루틴', - 'Indexes have been altered.' => '인덱스를 변경했습니다.', - 'Indexes' => '색인', - 'Alter indexes' => '인덱스 변경', - 'Add next' => '추가', - 'Language' => '언어', - 'Select' => '선택', - 'New item' => '항목 만들기', - 'Search' => '검색', - 'Sort' => '정렬', + 'Databases have been dropped.' => '데이터베이스를 삭제했습니다.', + 'Date and time' => '시간', + 'Default values' => '기본값', + 'Delete' => '삭제', 'descending' => '역순', - 'Limit' => '제약', - 'No rows.' => '행이 없습니다.', - 'Action' => '실행', + 'Drop' => '삭제', + 'E-mail' => '메일', + 'Edit all' => '모두 편집', + 'Edit' => '편집', 'edit' => '편집', - 'Page' => '페이지', - 'Query executed OK, %d row(s) affected.' => '쿼리를 실행했습니다. %d 행을 변경했습니다.', + 'Editor' => '에디터', + 'empty' => '비어있음', + 'End' => '종료', + 'engine' => '엔진', + 'Engine' => '엔진', 'Error in query' => '쿼리의 오류', + 'Event has been altered.' => '변경했습니다.', + 'Event has been created.' => '만들었습니다.', + 'Event has been dropped.' => '삭제했습니다.', + 'Event' => '이벤트', + 'Events' => '이벤트', + 'Every' => '매 번', 'Execute' => '실행', - 'Table' => '테이블', - 'Foreign keys' => '외부 키', - 'Triggers' => '트리거', - 'View' => '보기', - 'Unable to select the table' => '테이블을 선택할 수 없습니다.', - 'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰. 다시 보내주십시오.', - 'Comment' => '코멘트', - 'Default values' => '기본값', - '%d byte(s)' => '%d 바이트', - 'No commands to execute.' => '실행할 수 있는 명령이 없습니다.', - 'Unable to upload a file.' => '파일을 업로드 할 수 없습니다.', + 'Export' => '내보내기', + 'File does not exist.' => '파일이 존재하지 않습니다.', + 'File exists.' => '파일이 이미 있습니다.', 'File upload' => '파일 올리기', 'File uploads are disabled.' => '파일 업로드가 잘못되었습니다.', - 'Routine has been called, %d row(s) affected.' => '루틴을 호출했습니다. %d 행을 변경했습니다.', - 'Call' => '외침', - 'No extension' => '확장 기능이 없습니다.', - 'None of the supported PHP extensions (%s) are available.' => 'PHP 확장 (%s)가 설치되어 있지 않습니다.', - 'Session support must be enabled.' => '세션을 사용하십시오.', - 'Session expired, please login again.' => '세션 만료. 다시 로그인하십시오.', - 'Text length' => '문자열의 길이', - 'Foreign key has been dropped.' => '외부 키를 제거했습니다.', 'Foreign key has been altered.' => '외부 키를 변경했습니다.', 'Foreign key has been created.' => '외부 키를 만들었습니다.', + 'Foreign key has been dropped.' => '외부 키를 제거했습니다.', 'Foreign key' => '외부 키', - 'Target table' => '테이블', - 'Change' => '변경', - 'Source' => '소스', - 'Target' => '타겟', - 'Add column' => '열 추가', - 'Alter' => '변경', - 'Add foreign key' => '외부 키를 추가', - 'ON DELETE' => 'ON DELETE', - 'ON UPDATE' => 'ON UPDATE', - 'Index Type' => '인덱스 형', - 'Column (length)' => '열 (길이)', - 'View has been dropped.' => '보기를 삭제했습니다.', - 'View has been altered.' => '보기를 변경했습니다.', - 'View has been created.' => '보기를 만들었습니다.', - 'Alter view' => '보기 변경', - 'Create view' => '뷰 만들기', - 'Name' => '이름', - 'Process list' => '프로세스 목록', - '%d process(es) have been killed.' => '%d 프로세스를 강제 종료되었습니다.', - 'Kill' => '강제 종료', - 'Parameter name' => '참조 여명', - 'Database schema' => '구조', - 'Create procedure' => '시저 만들기', - 'Create function' => '함수 만들기', - 'Routine has been dropped.' => '루틴 만들기', - 'Routine has been altered.' => '루틴 변경', - 'Routine has been created.' => '루틴 만들기', - 'Alter function' => '함수의 변경', - 'Alter procedure' => '시저 변경', - 'Return type' => '반환 형식', - 'Add trigger' => '트리거 추가', - 'Trigger has been dropped.' => '트리거를 제거했습니다.', - 'Trigger has been altered.' => '트리거를 변경했습니다.', - 'Trigger has been created.' => '트리거를 추가했습니다.', - 'Alter trigger' => '트리거 변경', - 'Create trigger' => '트리거 만들기', - 'Time' => '시간', - 'Event' => '이벤트', - '%s version: %s through PHP extension %s' => '%s 버전 %s, PHP 확장 %s', - '%d row(s)' => '%d 행', - 'Remove' => '제외', - 'Are you sure?' => '실행 하시겠습니까?', - 'Privileges' => '권한', - 'Create user' => '사용자 만들기', - 'User has been dropped.' => '사용자 삭제', - 'User has been altered.' => '사용자 변경', - 'User has been created.' => '사용자 만들기', - 'Hashed' => 'Hashed', - 'Column' => '열', - 'Routine' => '루틴', - 'Grant' => '권한 부여', - 'Revoke' => '권한 취소', - 'Logged as: %s' => '로그 : %s', - 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST 데이터가 너무 큽니다. 데이터 크기를 줄이거나 %s 설정을 늘리십시오.', - 'Move up' => '상', - 'Move down' => '아래', - 'Export' => '내보내기', - 'Tables' => '테이블', - 'Data' => '데이터', - 'Output' => '출력', - 'open' => '열', - 'save' => '저장', + 'Foreign keys' => '외부 키', 'Format' => '형식', + 'From server' => '서버에서 실행', + 'From' => '보낸 사람', 'Functions' => '함수', - 'Aggregation' => '집합', - 'Event has been dropped.' => '삭제했습니다.', - 'Event has been altered.' => '변경했습니다.', - 'Event has been created.' => '만들었습니다.', - 'Alter event' => '변경', - 'Create event' => '만들기', - 'Start' => '시작', - 'End' => '종료', - 'Every' => '매번', - 'Status' => '상태', - 'On completion preserve' => '완성 후 저장', - 'Events' => '이벤트', - 'Schedule' => '일정', - 'At given time' => '지정 시간', - 'Tables have been truncated.' => '테이블을 truncate했습니다.', - 'Tables have been moved.' => '테이블을 옮겼습니다.', - 'Tables and views' => '테이블과 뷰', - 'Engine' => '엔진', - 'Collation' => '정렬', - 'Data Length' => '데이터 길이', - 'Index Length' => '인덱스 길이', - 'Data Free' => '여유', - 'Rows' => '행', - ',' => ',', - '0123456789' => '0123456789', - 'Analyze' => '분석', - 'Optimize' => '최적화', - 'Check' => '확인', - 'Repair' => '복구', - 'Truncate' => 'Truncate', + 'Geometry' => '기하 형', + 'Grant' => '권한 부여', + 'Hashed' => 'Hashed', + 'HH:MM:SS' => '시:분:초', + 'History' => '이력', + 'Import' => '가져 오기', + 'Index Length' => '색인 길이', + 'Index Type' => '색인 형', + 'Indexes have been altered.' => '색인을 변경했습니다.', + 'Indexes' => '색인', + 'Insert' => '삽입', + 'Invalid credentials.' => '잘못된 로그인', + 'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.', + 'Invalid database.' => '잘못된 데이터베이스입니다.', + 'Invalid schema.' => '잘못된 스키마입니다.', + 'Item has been deleted.' => '항목을 삭제했습니다.', + 'Item has been updated.' => '항목을 갱신했습니다.', + 'Item%s has been inserted.' => '%s 항목을 삽입했습니다.', + 'Kill' => '강제 종료', + 'Language' => '언어', + 'last' => '마지막', + 'Length' => '길이', + 'Limit rows' => '행 제약', + 'Limit' => '제약', + 'Lists' => '목록', + 'Load more data' => '더 많은 데이터 부르기', + 'Loading' => '부르는 중', + 'Logged as: %s' => '다음으로 로그인했습니다: %s', + 'Login' => '로그인', + 'Logout successful.' => '로그아웃을 성공했습니다.', + 'Logout' => '로그아웃', + 'ltr' => 'ltr', + 'Maximum allowed file size is %sB.' => '파일의 최대 크기 %sB', + 'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s(을)를 늘리십시오.', + 'Modify' => '수정', + 'Move down' => '아래로', 'Move to other database' => '다른 데이터베이스로 이동', + 'Move up' => '위로', 'Move' => '이동', - 'Save and continue edit' => '저장하고 계속', - 'original' => '원래', - '%d item(s) have been affected.' => '%d를 갱신했습니다.', - 'Whole result' => '모든 결과', - 'Tables have been dropped.' => '테이블을 삭제했습니다.', - 'Clone' => '복제', - 'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.', + 'Name' => '이름', + 'Network' => '네트워크 형', + 'New item' => '항목 만들기', + 'No commands to execute.' => '실행할 수 있는 명령이 없습니다.', + 'No extension' => '확장이 없습니다.', + 'No rows.' => '행이 없습니다.', + 'No tables.' => '테이블이 없습니다.', + 'None of the supported PHP extensions (%s) are available.' => 'PHP 확장(%s)이 설치되어 있지 않습니다.', + 'now' => '현재 시간', + 'Numbers' => '숫자', + 'On completion preserve' => '완성 후 저장', + 'ON DELETE' => '지울 때', + 'ON UPDATE' => '업데이트할 때', + 'open' => '열', + 'Optimize' => '최적화', + 'Options' => '설정', + 'original' => '원본', + 'Output' => '출력', + 'overwrite' => '덮어쓰기', + 'Page' => '페이지', + 'Parameter name' => '매개변수 이름', 'Partition by' => '파티션', - 'Partitions' => '파티션', 'Partition name' => '파티션 이름', - 'Values' => '값', - '%d row(s) have been imported.' => '%d 행을 가져 왔습니다.', - 'Show structure' => '구조', - 'anywhere' => '모든', - 'Import' => '가져 오기', - 'Stop on error' => '오류의 경우 중지', - 'Select data' => '데이터', - '%.3f s' => '%.3f 초', - '$1-$3-$5' => '$1-$3-$5', - '[yyyy]-mm-dd' => '[yyyy]-mm-dd', - 'History' => '역사', - 'Variables' => '변수', - 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => '원본 및 대상 열은 동일한 데이터 형식이어야합니다. 목표 컬럼에 인덱스와 데이터가 존재해야합니다.', + 'Partitions' => '파티션', + 'Password' => '비밀번호', + 'Permanent link' => '영구적으로 링크', + 'Permanent login' => '영구적으로 로그인', + 'Please use one of the extensions %s.' => '확장 %s 중 하나를 사용하십시오.', + 'Privileges' => '권한', + 'Process list' => '프로세스 목록', + 'Query executed OK, %d row(s) affected.' => '쿼리를 잘 실행했습니다. %d행을 변경했습니다.', + 'Refresh' => '새로 고침', 'Relations' => '관계', + 'Remove' => '제거', + 'Repair' => '복구', + 'Return type' => '반환 형식', + 'Revoke' => '권한 취소', + 'Routine has been altered.' => '루틴을 변경했습니다.', + 'Routine has been called, %d row(s) affected.' => '루틴을 호출했습니다. %d 행을 변경했습니다.', + 'Routine has been created.' => '루틴을 추가했습니다.', + 'Routine has been dropped.' => '루틴을 제거했습니다.', + 'Routine' => '루틴', + 'Routines' => '루틴', + 'Rows' => '행', 'Run file' => '파일을 실행', - 'Clear' => '삭제', - 'Maximum allowed file size is %sB.' => '파일의 최대 크기 %sB', - 'Numbers' => '숫자', - 'Date and time' => '시간', - 'Strings' => '문자열', - 'Binary' => '이진', - 'Lists' => '목록', - 'Editor' => '에디터', - 'E-mail' => '메일', - 'From' => '보낸 사람', - 'Subject' => '제목', - 'Send' => '보내기', - '%d e-mail(s) have been sent.' => '%d 메일을 보냈습니다.', - 'Webserver file %s' => 'Web 서버 파일 %s', - 'File does not exist.' => '파일이 존재하지 않습니다.', - '%d in total' => '총 %d', - 'Permanent login' => '영구적으로 로그인', - 'Databases have been dropped.' => '데이터베이스를 삭제했습니다.', - 'Search data in tables' => '데이터 검색', - 'Schema' => '스키마', - 'Alter schema' => '스키마 변경', - 'Create schema' => '스키마 추가', - 'Schema has been dropped.' => '스키마를 삭제했습니다.', - 'Schema has been created.' => '스키마를 추가했습니다.', + 'Save and continue edit' => '저장하고 계속 편집하기', + 'Save and insert next' => '저장하고 다음에 추가', + 'Save' => '저장', + 'save' => '저장', + 'Schedule' => '예약', 'Schema has been altered.' => '스키마를 변경했습니다.', - 'Sequences' => '시퀀스', - 'Create sequence' => '시퀀스 만들기', - 'Alter sequence' => '순서 변경', - 'Sequence has been dropped.' => '시퀀스를 제거했습니다.', + 'Schema has been created.' => '스키마를 추가했습니다.', + 'Schema has been dropped.' => '스키마를 삭제했습니다.', + 'Schema' => '스키마', + 'Search data in tables' => '테이블 내 데이터 검색', + 'Search' => '검색', + 'Select data' => '데이터를 선택하십시오.', + 'Select database' => '데이터베이스를 선택하십시오.', + 'Select' => '선택', + 'select' => '선택', + 'Selected' => '선택됨', + 'Send' => '보내기', + 'Sequence has been altered.' => '시퀀스를 변경했습니다.', 'Sequence has been created.' => '시퀀스를 추가했습니다.', - 'Sequence has been altered.' => '순서를 변경했습니다.', - 'User types' => '사용자 정의 형', - 'Create type' => '사용자 정의 형식 만들기', - 'Alter type' => '사용자 정의 형식 변경', - 'Type has been dropped.' => '사용자 정의 형식을 삭제했습니다.', - 'Type has been created.' => '사용자 정의 형식을 추가했습니다.', - 'Use edit link to modify this value.' => '링크 편집', - 'last' => '마지막', - 'From server' => '서버에서 실행', - 'System' => '데이터베이스 형식', - 'empty' => '하늘', - 'Network' => '네트워크 형', - 'Geometry' => '기하 형', - 'File exists.' => '파일이 이미 있습니다.', - 'Attachments' => '첨부 파일', - 'Item%s has been inserted.' => '%s 항목을 삽입했습니다.', - 'now' => '현재 시간', - '%d query(s) executed OK.' => '%d 쿼리를 실행했습니다.', + 'Sequence has been dropped.' => '시퀀스를 제거했습니다.', + 'Sequences' => '시퀀스', + 'Server' => '서버', + 'Session expired, please login again.' => '세션이 만료되었습니다. 다시 로그인하십시오.', + 'Session support must be enabled.' => '세션 지원을 사용해야만 합니다.', 'Show only errors' => '오류 만 표시', - 'Refresh' => '새로 고침', - 'Invalid schema.' => '잘못된 스키마', - 'Please use one of the extensions %s.' => '하나의 확장 기능을 사용하십시오 %s', - 'ltr' => 'ltr', + 'Show structure' => '구조 표시', + 'Size' => '크기', + 'Sort' => '정렬', + 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => '원본과 대상 열은 동일한 데이터 형식이어야만 합니다. 목표 열에 색인과 데이터가 존재해야만 합니다.', + 'Source' => '소스', + 'SQL command' => 'SQL 명령', + 'Start' => '시작', + 'Status' => '상태', + 'Stop on error' => '오류의 경우 중지', + 'Strings' => '문자열', + 'Subject' => '제목', + 'System' => '데이터베이스 형식', + 'Table has been altered.' => '테이블을 변경했습니다.', + 'Table has been created.' => '테이블을 만들었습니다.', + 'Table has been dropped.' => '테이블을 삭제했습니다.', + 'Table name' => '테이블 이름', + 'Table' => '테이블', + 'Tables and views' => '테이블과 뷰', 'Tables have been copied.' => '테이블을 복사했습니다', - 'Copy' => '복사', - 'Permanent link' => '영구 링크', - 'Edit all' => '모든 편집', - 'HH:MM:SS' => '시:분:초', + 'Tables have been dropped.' => '테이블을 삭제했습니다.', + 'Tables have been moved.' => '테이블을 옮겼습니다.', + 'Tables have been truncated.' => '테이블의 데이터 내용만 지웠습니다.', + 'Tables' => '테이블', + 'Target table' => '테이블', + 'Target' => '타겟', + 'Text length' => '문자열의 길이', + 'Time' => '시간', + 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST 데이터가 너무 큽니다. 데이터 크기를 줄이거나 %s 설정을 늘리십시오.', + 'Trigger has been altered.' => '트리거를 변경했습니다.', + 'Trigger has been created.' => '트리거를 추가했습니다.', + 'Trigger has been dropped.' => '트리거를 제거했습니다.', + 'Triggers' => '트리거', + 'Truncate' => '데이터 내용만 지우기', + 'Type has been created.' => '유형을 추가했습니다.', + 'Type has been dropped.' => '유형을 삭제했습니다.', + 'Type' => '형', + 'Unable to select the table' => '테이블을 선택할 수 없습니다.', + 'Unable to upload a file.' => '파일을 업로드 할 수 없습니다.', + 'Use edit link to modify this value.' => '이 값을 수정하려면 편집 링크를 사용하십시오.', + 'Use' => '사용', + 'User has been altered.' => '사용자를 변경했습니다.', + 'User has been created.' => '사용자를 만들었습니다.', + 'User has been dropped.' => '사용자를 제거했습니다.', + 'Username' => '사용자이름', + 'Vacuum' => '청소', + 'Values' => '값', + 'Variables' => '변수', + 'View has been altered.' => '보기를 변경했습니다.', + 'View has been created.' => '보기를 만들었습니다.', + 'View has been dropped.' => '보기를 삭제했습니다.', + 'View' => '보기', + 'Warnings' => '경고', + 'Webserver file %s' => '웹서버 파일 %s', + 'Whole result' => '모든 결과', + 'yes' => '네', + 'You are offline.' => '오프라인입니다.', + 'You can upload a big SQL file via FTP and import it from server.' => '큰 SQL 파일은 FTP를 통하여 업로드하여 서버에서 가져올 수 있습니다.', + 'You have no privileges to update this table.' => '이 테이블을 업데이트할 권한이 없습니다.', ); From 8762895bb3edbd8849afc2a866a60ae081e49a1a Mon Sep 17 00:00:00 2001 From: Michal Adamec Date: Wed, 18 Mar 2020 17:26:50 +0100 Subject: [PATCH 030/144] MSSQL: Don't trucate displayed comments to 30 chars (use varchar maximum of 8000 upon casting) --- adminer/drivers/mssql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index eba5dc521..f5836c4bb 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -368,7 +368,7 @@ function fk_support($table_status) { } function fields($table) { - $comments = get_key_vals("SELECT objname, cast(value as varchar) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)"); + $comments = get_key_vals("SELECT objname, cast(value as varchar(max)) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)"); $return = array(); foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default] FROM sys.all_columns c diff --git a/changes.txt b/changes.txt index 9502f6dc6..1f684cd9d 100644 --- a/changes.txt +++ b/changes.txt @@ -5,6 +5,7 @@ PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) +MS SQL: Don't truncate comments to 30 chars (PR #376) Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06): From 23fdbedba1ebbb58bfc65d1296db3999e27670a7 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 15:33:50 +0100 Subject: [PATCH 031/144] PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) --- adminer/drivers/pgsql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 7437aa435..577afd4ff 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -510,7 +510,7 @@ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $colla $val5 = $val[5]; unset($val[5]); if (isset($val[6]) && $field[0] == "") { // auto_increment - $val[1] = ($val[1] == "bigint" ? " big" : " ") . "serial"; + $val[1] = ($val[1] == " bigint" ? " big" : " ") . "serial"; } if ($field[0] == "") { $alter[] = ($table != "" ? "ADD " : " ") . implode($val); diff --git a/changes.txt b/changes.txt index 1f684cd9d..fe7181827 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,7 @@ MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) +PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) MS SQL: Don't truncate comments to 30 chars (PR #376) Re-enable PHP warnings (regression from 4.7.8) From ee75df6f15277654511a5bb98bf77e5499d71ea0 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 16:11:02 +0100 Subject: [PATCH 032/144] Don't syntax highlight during IME composition (bug #747) --- changes.txt | 1 + externals/jush | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changes.txt b/changes.txt index fe7181827..8dc013f7c 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.7.9-dev: Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 +Don't syntax highlight during IME composition (bug #747) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) diff --git a/externals/jush b/externals/jush index e728e6457..ae33623c6 160000 --- a/externals/jush +++ b/externals/jush @@ -1 +1 @@ -Subproject commit e728e6457626e1b83374f89651cd1a623c001baf +Subproject commit ae33623c66189375a3654954cddc1c73f65c36fa From cc9ed0939cc5a79bab15f62a65a1161335df002c Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 16:11:21 +0100 Subject: [PATCH 033/144] Editor: Cast to string when searching (bug #325) --- changes.txt | 1 + editor/include/adminer.inc.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changes.txt b/changes.txt index 8dc013f7c..bd22131bb 100644 --- a/changes.txt +++ b/changes.txt @@ -8,6 +8,7 @@ PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) MS SQL: Don't truncate comments to 30 chars (PR #376) +Editor: Cast to string when searching (bug #325) Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06): diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 16bb888a2..ae9b0843a 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -341,6 +341,7 @@ function selectColumnsProcess($columns, $indexes) { } function selectSearchProcess($fields, $indexes) { + global $driver; $return = array(); foreach ((array) $_GET["where"] as $key => $where) { $col = $where["col"]; @@ -356,11 +357,11 @@ function selectSearchProcess($fields, $indexes) { } else { $text_type = preg_match('~char|text|enum|set~', $field["type"]); $value = $this->processInput($field, (!$op && $text_type && preg_match('~^[^%]+$~', $val) ? "%$val%" : $val)); - $conds[] = $name . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") . " $value" + $conds[] = $driver->convertSearch($name, $val, $field) . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") . " $value" : (in_array($op, $this->operators) || $op == "=" ? " $op $value" : ($text_type ? " LIKE $value" : " IN (" . str_replace(",", "', '", $value) . ")" - ))); //! can issue "Illegal mix of collations" for columns in other character sets - solve by CONVERT($name using utf8) + ))); if ($key < 0 && $val == "0") { $conds[] = "$name IS NULL"; } From b2e0d9f3962265378a831bdcc737a462c5531a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 21 Jul 2020 20:53:56 +0200 Subject: [PATCH 034/144] fix wrong hungarian translation --- adminer/lang/hu.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/lang/hu.inc.php b/adminer/lang/hu.inc.php index 973147497..ea85c2e09 100644 --- a/adminer/lang/hu.inc.php +++ b/adminer/lang/hu.inc.php @@ -175,7 +175,7 @@ 'Repair' => 'Javít', 'Truncate' => 'Felszabadít', 'Tables have been truncated.' => 'A tábla felszabadítva.', - 'Rows' => 'Oszlop', + 'Rows' => 'Sorok', ',' => ' ', '0123456789' => '0123456789', 'Tables have been moved.' => 'Táblák áthelyezve.', From 7edf80f6364b5775f3b7b1efa64063a52ec2c736 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 16:45:20 +0100 Subject: [PATCH 035/144] PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771) --- adminer/drivers/pgsql.inc.php | 3 +-- changes.txt | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 577afd4ff..82196927f 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -150,8 +150,7 @@ class Min_DB extends Min_PDO { function connect($server, $username, $password) { global $adminer; $db = $adminer->database(); - $string = "pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' options='-c client_encoding=utf8'"; - $this->dsn("$string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", $username, $password); + $this->dsn("pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' client_encoding=utf8 dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", $username, $password); //! client_encoding is supported since 9.1 but we can't yet use min_version here //! connect without DB in case of an error return true; } diff --git a/changes.txt b/changes.txt index bd22131bb..a731bc3c6 100644 --- a/changes.txt +++ b/changes.txt @@ -6,6 +6,7 @@ PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) +PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) MS SQL: Don't truncate comments to 30 chars (PR #376) Editor: Cast to string when searching (bug #325) From 438c7f55be58d4b0cfdb72598fbb0c884cd00112 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 16:58:59 +0100 Subject: [PATCH 036/144] Add comment --- plugins/login-otp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/login-otp.php b/plugins/login-otp.php index c6015f4b0..1e459b3eb 100644 --- a/plugins/login-otp.php +++ b/plugins/login-otp.php @@ -1,7 +1,7 @@ Date: Sat, 6 Feb 2021 17:17:36 +0100 Subject: [PATCH 037/144] PostgreSQL: Support smallserial --- adminer/drivers/pgsql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 82196927f..98e5974f0 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -509,7 +509,7 @@ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $colla $val5 = $val[5]; unset($val[5]); if (isset($val[6]) && $field[0] == "") { // auto_increment - $val[1] = ($val[1] == " bigint" ? " big" : " ") . "serial"; + $val[1] = ($val[1] == " bigint" ? " big" : ($val[1] == " smallint" ? " small" : " ")) . "serial"; } if ($field[0] == "") { $alter[] = ($table != "" ? "ADD " : " ") . implode($val); From f8288dd227180977dcc9d147922f6c77e343488a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 18:01:24 +0100 Subject: [PATCH 038/144] PostgreSQL 11: Create PRIMARY KEY for auto increment columns --- adminer/drivers/pgsql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 98e5974f0..f3c880b23 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -491,7 +491,7 @@ function rename_database($name, $collation) { } function auto_increment() { - return ""; + return (min_version(11) ? " PRIMARY KEY" : ""); } function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) { diff --git a/changes.txt b/changes.txt index a731bc3c6..62a296adb 100644 --- a/changes.txt +++ b/changes.txt @@ -8,6 +8,7 @@ PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) +PostgreSQL 11: Create PRIMARY KEY for auto increment columns MS SQL: Don't truncate comments to 30 chars (PR #376) Editor: Cast to string when searching (bug #325) Re-enable PHP warnings (regression from 4.7.8) From cde988853df04f3e7f2f93dd660b277f588be962 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 18:01:39 +0100 Subject: [PATCH 039/144] SQLite: Set busy_timeout to 500 --- adminer/drivers/sqlite.inc.php | 1 + changes.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/adminer/drivers/sqlite.inc.php b/adminer/drivers/sqlite.inc.php index 4876ebe07..b33cd9aae 100644 --- a/adminer/drivers/sqlite.inc.php +++ b/adminer/drivers/sqlite.inc.php @@ -191,6 +191,7 @@ function select_db($filename) { if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3 parent::__construct($filename); $this->query("PRAGMA foreign_keys = 1"); + $this->query("PRAGMA busy_timeout = 500"); return true; } return false; diff --git a/changes.txt b/changes.txt index 62a296adb..5a9b02072 100644 --- a/changes.txt +++ b/changes.txt @@ -9,6 +9,7 @@ PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3 PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) PostgreSQL 11: Create PRIMARY KEY for auto increment columns +SQLite: Set busy_timeout to 500 MS SQL: Don't truncate comments to 30 chars (PR #376) Editor: Cast to string when searching (bug #325) Re-enable PHP warnings (regression from 4.7.8) From 5c395afc098e501be3417017c6421968aac477bd Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 19:04:15 +0100 Subject: [PATCH 040/144] Fix XSS in browsers which don't encode URL parameters (bug #775) --- adminer/sql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 69ba1779e..0192959ac 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -222,7 +222,7 @@ } echo "

"; textarea("query", $q, 20); - echo script(($_POST ? "" : "qs('textarea').focus();\n") . "qs('#form').onsubmit = partial(sqlSubmit, qs('#form'), '" . remove_from_uri("sql|limit|error_stops|only_errors") . "');"); + echo script(($_POST ? "" : "qs('textarea').focus();\n") . "qs('#form').onsubmit = partial(sqlSubmit, qs('#form'), '" . js_escape(remove_from_uri("sql|limit|error_stops|only_errors|history")) . "');"); echo "

$execute\n"; echo lang('Limit rows') . ": \n"; diff --git a/changes.txt b/changes.txt index 5a9b02072..2757183c7 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 4.7.9-dev: +Fix XSS in browsers which don't encode URL parameters (bug #775, regression from 4.7.0) Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Don't syntax highlight during IME composition (bug #747) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) From 95729680ef4ecdbfc79e6be00b3e01b6623be74e Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 6 Feb 2021 19:09:54 +0100 Subject: [PATCH 041/144] Respect SQL command URL parameters --- adminer/sql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 0192959ac..7a21235de 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -244,8 +244,8 @@ echo "

"; } -echo checkbox("error_stops", 1, ($_POST ? $_POST["error_stops"] : isset($_GET["import"])), lang('Stop on error')) . "\n"; -echo checkbox("only_errors", 1, ($_POST ? $_POST["only_errors"] : isset($_GET["import"])), lang('Show only errors')) . "\n"; +echo checkbox("error_stops", 1, ($_POST ? $_POST["error_stops"] : isset($_GET["import"]) || $_GET["error_stops"]), lang('Stop on error')) . "\n"; +echo checkbox("only_errors", 1, ($_POST ? $_POST["only_errors"] : isset($_GET["import"]) || $_GET["only_errors"]), lang('Show only errors')) . "\n"; echo "\n"; if (!isset($_GET["import"]) && $history) { From 6e5315349b17dec2151aadf3ea72a3386dca7eda Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 12 Jan 2021 21:32:04 +0100 Subject: [PATCH 042/144] fixed Unsupported operand types when $port is socket --- adminer/include/auth.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index 964f1d907..67a594845 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -162,7 +162,7 @@ function auth_error($error) { if (isset($_GET["username"]) && is_string(get_password())) { list($host, $port) = explode(":", SERVER, 2); - if (+$port && ($port < 1024 || $port > 65535)) { + if (preg_match('~^\s*([-+]?\d+)~', $port, $match) && ($match[1] < 1024 || $match[1] > 65535)) { // is_numeric('80#') would still connect to port 80 auth_error(lang('Connecting to privileged ports is not allowed.')); } check_invalid_login(); diff --git a/changes.txt b/changes.txt index 2757183c7..3efc970bb 100644 --- a/changes.txt +++ b/changes.txt @@ -3,6 +3,7 @@ Fix XSS in browsers which don't encode URL parameters (bug #775, regression from Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Don't syntax highlight during IME composition (bug #747) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) +MySQL: Avoid error in PHP 8 when connecting to socket (PR #409) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) From 19f23fe9eecb88a7636e3c70679787e531cfd841 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 7 Feb 2021 09:17:44 +0100 Subject: [PATCH 043/144] MySQL: Don't quote default value of text fields (bug #779) --- adminer/drivers/mysql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 942c0dfc8..1d7922114 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -547,7 +547,7 @@ function fields($table) { "type" => $match[1], "length" => $match[2], "unsigned" => ltrim($match[3] . $match[4]), - "default" => ($row["Default"] != "" || preg_match("~char|set~", $match[1]) ? $row["Default"] : null), + "default" => ($row["Default"] != "" || preg_match("~char|set~", $match[1]) ? (preg_match('~text~', $match[1]) ? stripslashes(preg_replace("~^'(.*)'\$~", '\1', $row["Default"])) : $row["Default"]) : null), "null" => ($row["Null"] == "YES"), "auto_increment" => ($row["Extra"] == "auto_increment"), "on_update" => (preg_match('~^on update (.+)~i', $row["Extra"], $match) ? $match[1] : ""), //! available since MySQL 5.1.23 diff --git a/changes.txt b/changes.txt index 3efc970bb..b9241bc8a 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,7 @@ Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Don't syntax highlight during IME composition (bug #747) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) MySQL: Avoid error in PHP 8 when connecting to socket (PR #409) +MySQL: Don't quote default value of text fields (bug #779) PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) From 31e28fbd00ec39ae7bd56379828739728929d884 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 7 Feb 2021 09:41:07 +0100 Subject: [PATCH 044/144] Quote values with leading and trailing zeroes in CSV export (bug #777) --- adminer/include/functions.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 9be33b0de..0dc2a8fae 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -1129,7 +1129,7 @@ function dump_headers($identifier, $multi_table = false) { */ function dump_csv($row) { foreach ($row as $key => $val) { - if (preg_match("~[\"\n,;\t]~", $val) || $val === "") { + if (preg_match('~["\n,;\t]|^0|\.\d*0$~', $val) || $val === "") { $row[$key] = '"' . str_replace('"', '""', $val) . '"'; } } diff --git a/changes.txt b/changes.txt index b9241bc8a..e14a02f87 100644 --- a/changes.txt +++ b/changes.txt @@ -2,6 +2,7 @@ Adminer 4.7.9-dev: Fix XSS in browsers which don't encode URL parameters (bug #775, regression from 4.7.0) Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Don't syntax highlight during IME composition (bug #747) +Quote values with leading and trailing zeroes in CSV export (bug #777) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) MySQL: Avoid error in PHP 8 when connecting to socket (PR #409) MySQL: Don't quote default value of text fields (bug #779) From 7db10e95d9917dca299bb563ecb790ff7c3444e4 Mon Sep 17 00:00:00 2001 From: tiso Date: Wed, 27 Jan 2021 00:30:44 +0100 Subject: [PATCH 045/144] Title for select data link --- adminer/include/adminer.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 500e4eaab..47a5b4575 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -1038,7 +1038,10 @@ function tablesPrint($tables) { foreach ($tables as $table => $status) { $name = $this->tableName($status); if ($name != "") { - echo '

  • " . lang('select') . " "; + echo '
  • " . lang('select') . " " + ; echo (support("table") || support("indexes") ? ' Date: Wed, 27 Jan 2021 17:35:02 +0200 Subject: [PATCH 046/144] Linkify URLs in SQL results --- adminer/include/editing.inc.php | 27 ++++++++++++++++----------- changes.txt | 1 + 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 517cb539a..3cc2734eb 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -61,6 +61,20 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0) } echo ""; foreach ($row as $key => $val) { + $link = ""; + if (isset($links[$key]) && !$columns[$links[$key]]) { + if ($orgtables && $jush == "sql") { // MySQL EXPLAIN + $table = $row[array_search("table=", $links)]; + $link = ME . $links[$key] . urlencode($orgtables[$table] != "" ? $orgtables[$table] : $table); + } else { + $link = ME . "edit=" . urlencode($links[$key]); + foreach ($indexes[$links[$key]] as $col => $j) { + $link .= "&where" . urlencode("[" . bracket_escape($col) . "]") . "=" . urlencode($row[$j]); + } + } + } elseif (is_url($val)) { + $link = $val; + } if ($val === null) { $val = "NULL"; } elseif ($blobs[$key] && !is_utf8($val)) { @@ -71,17 +85,8 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0) $val = "$val"; } } - if (isset($links[$key]) && !$columns[$links[$key]]) { - if ($orgtables && $jush == "sql") { // MySQL EXPLAIN - $table = $row[array_search("table=", $links)]; - $link = $links[$key] . urlencode($orgtables[$table] != "" ? $orgtables[$table] : $table); - } else { - $link = "edit=" . urlencode($links[$key]); - foreach ($indexes[$links[$key]] as $col => $j) { - $link .= "&where" . urlencode("[" . bracket_escape($col) . "]") . "=" . urlencode($row[$j]); - } - } - $val = "$val"; + if ($link) { + $val = "$val"; } echo "$val"; } diff --git a/changes.txt b/changes.txt index e14a02f87..7d672eff3 100644 --- a/changes.txt +++ b/changes.txt @@ -3,6 +3,7 @@ Fix XSS in browsers which don't encode URL parameters (bug #775, regression from Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200 Don't syntax highlight during IME composition (bug #747) Quote values with leading and trailing zeroes in CSV export (bug #777) +Link URLs in SQL command (PR #411) MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug #749) MySQL: Avoid error in PHP 8 when connecting to socket (PR #409) MySQL: Don't quote default value of text fields (bug #779) From 8c392363b11294a1db1b293ebb4dcc506fcb7539 Mon Sep 17 00:00:00 2001 From: Josef Drabek Date: Wed, 12 Aug 2020 00:27:34 +0200 Subject: [PATCH 047/144] Postgres - fix missing partitioned tables in navigation --- adminer/drivers/pgsql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index f3c880b23..b5a47ac9b 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -326,7 +326,7 @@ function table_status($name = "") { foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", pg_relation_size(c.oid) AS \"Data_length\", pg_total_relation_size(c.oid) - pg_relation_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", " . (min_version(12) ? "''" : "CASE WHEN c.relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\", c.reltuples as \"Rows\", n.nspname FROM pg_class c JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace) -WHERE relkind IN ('r', 'm', 'v', 'f') +WHERE relkind IN ('r', 'm', 'v', 'f', 'p') " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname") ) as $row) { //! Index_length, Auto_increment $return[$row["Name"]] = $row; diff --git a/changes.txt b/changes.txt index 7d672eff3..e7cd82d39 100644 --- a/changes.txt +++ b/changes.txt @@ -13,6 +13,7 @@ PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0) PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) +PostgreSQL 10: Support partitioned tables (PR #396) PostgreSQL 11: Create PRIMARY KEY for auto increment columns SQLite: Set busy_timeout to 500 MS SQL: Don't truncate comments to 30 chars (PR #376) From 5c2f74136cbb2585b3366c03123e85d5cec77b53 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 7 Feb 2021 11:34:47 +0100 Subject: [PATCH 048/144] Update bug numbers --- changes.txt | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/changes.txt b/changes.txt index e7cd82d39..d4bc57043 100644 --- a/changes.txt +++ b/changes.txt @@ -357,7 +357,7 @@ Adminer 3.7.1 (released 2013-06-29): Increase click target for checkboxes Use shadow for highlighting default button Don't use LIMIT 1 if inline updating unique row -Don't check previous checkbox on added column in create table (bug #3614245) +Don't check previous checkbox on added column in create table (bug #326) Order table list by name Verify UTF-8 encoding of CSV import Notify user about expired master password for permanent login @@ -368,7 +368,7 @@ Display error on invalid alter table and view pages MySQL: Speed up updating rows without numeric or UTF-8 primary key Non-MySQL: Descending indexes PostgreSQL: Fix detecting oid column in PDO -PostgreSQL: Handle timestamp types (bug #3614086) +PostgreSQL: Handle timestamp types (bug #324) Add Korean translation Adminer 3.7.0 (released 2013-05-19): @@ -381,9 +381,9 @@ Disable SQL export when applying functions in select Allow using lang() in plugins (customization) Remove bzip2 compression support Constraint memory used in TAR export -Allow exporting views dependent on each other (bug #3459151) -Fix resetting search (bug #3612507) -Don't use LIMIT 1 if updating unique row (bug #3613109) +Allow exporting views dependent on each other (bug #214) +Fix resetting search (bug #318) +Don't use LIMIT 1 if updating unique row (bug #320) Restrict editing rows without unique identifier to search results Display navigation bellow main content on mobile browsers Get number of rows on export page asynchronously @@ -391,7 +391,7 @@ Respect 'whole result' even if some rows are checked (bug #339 since Adminer 3.7 MySQL: Optimize create table page and Editor navigation MySQL: Display bit type as binary number MySQL: Improve export of binary data types -MySQL: Fix handling of POINT data type (bug #3582578) +MySQL: Fix handling of POINT data type (bug #282) MySQL: Don't export binary and geometry columns twice in select MySQL: Fix EXPLAIN in MySQL < 5.1, bug since Adminer 3.6.4 SQLite: Export views @@ -406,11 +406,11 @@ Recover original view, trigger, routine if creating fails Do not store plain text password to history in creating user Selectable ON UPDATE CURRENT_TIMESTAMP field in create table Open database to a new window after selecting it with Ctrl -Clear column name after resetting search (bug #3601200) -Explain partitions in SQL query (bug #3600150) -Allow loading more data with inline edit (bug #3605531) -Stay on the same page after deleting rows (bug #3605845) -Respect checked tables in export filename (bug #3245464) +Clear column name after resetting search (bug #296) +Explain partitions in SQL query (bug #294) +Allow loading more data with inline edit (bug #299) +Stay on the same page after deleting rows (bug #301) +Respect checked tables in export filename (bug #133) Respect PHP configuration max_input_vars Fix unsetting permanent login after logout Disable autocapitalize in identifiers on mobile browsers @@ -495,11 +495,11 @@ Ukrainian translation Bengali translation Adminer 3.3.4 (released 2012-03-07): -Foreign keys default actions (bug #3397606) +Foreign keys default actions (bug #188) SET DEFAULT foreign key action Fix minor parser bug in SQL command with webserver file Ctrl+click on button opens form to a blank window -Trim table and column names (bug #3405309) +Trim table and column names (bug #195) Error message with no response from server in AJAX Esc to cancel AJAX request Move AJAX loading indicator to the right @@ -511,9 +511,9 @@ Ability to disable export (customization) Extensible list of databases (customization) MySQL: set autocommit after connect SQLite, PostgreSQL: vacuum -SQLite, PostgreSQL: don't use LIKE for numbers (bug #3420408) +SQLite, PostgreSQL: don't use LIKE for numbers (bug #202) PostgreSQL: fix alter foreign key -PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619) +PostgreSQL over PDO: connect if the eponymous database does not exist (bug #185) Boolean search (Editor) Persian translation @@ -541,8 +541,8 @@ Adminer 3.3.0 (released 2011-07-19): Use Esc to disable in-place edit Shortcut for database privileges Editable index names -Append new index with auto index selection (bug #3282127) -Preserve original timestamp value in multiple update (bug #3312614) +Append new index with auto index selection (bug #138) +Preserve original timestamp value in multiple update (bug #158) Bit type default value Display foreign key name in tooltip Display default column value in table overview @@ -556,7 +556,7 @@ Display foreign keys from other schemas (PostgreSQL) Pagination support (Oracle) Autocomplete for big foreign keys (Editor) Display name of the referenced record in PostgreSQL (Editor) -Prefer NULL to empty string (Editor, bug #3323800) +Prefer NULL to empty string (Editor, bug #162) Display searched columns (Editor) Customizable favicon (customization) Method name can return a link (customization) @@ -568,8 +568,8 @@ Fix AJAX history after reload Adminer 3.2.1 (released 2011-03-23): Ability to save expression in edit -Respect default database collation (bug #3191489) -Don't export triggers without table (bug #3193489) +Respect default database collation (bug #119) +Don't export triggers without table (bug #123) Esc to focus next field in Tab textarea Send forms by Ctrl+Enter on \n" ); echo "\n"; - if ($missing != "db" && DB != "" && $connection->select_db(DB)) { - if (support("scheme")) { + if (support("scheme")) { + if ($missing != "db" && DB != "" && $connection->select_db(DB)) { echo "
    " . lang('Schema') . ": $db_events"; if ($_GET["ns"] != "") { set_schema($_GET["ns"]); diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index a3e188fa5..38f477c8b 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -89,14 +89,16 @@ function connect_error() { exit; } -if (support("scheme") && DB != "" && $_GET["ns"] !== "") { - if (!isset($_GET["ns"])) { - redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema()); - } - if (!set_schema($_GET["ns"])) { - header("HTTP/1.1 404 Not Found"); - page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true); - page_footer("ns"); - exit; +if (support("scheme")) { + if (DB != "" && $_GET["ns"] !== "") { + if (!isset($_GET["ns"])) { + redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema()); + } + if (!set_schema($_GET["ns"])) { + header("HTTP/1.1 404 Not Found"); + page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true); + page_footer("ns"); + exit; + } } } diff --git a/adminer/processlist.inc.php b/adminer/processlist.inc.php index c2affc6a8..d726161b6 100644 --- a/adminer/processlist.inc.php +++ b/adminer/processlist.inc.php @@ -1,12 +1,14 @@ Date: Fri, 12 Feb 2021 16:27:00 +0100 Subject: [PATCH 129/144] Update TODO --- todo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo.txt b/todo.txt index 365eff954..bf6b99864 100644 --- a/todo.txt +++ b/todo.txt @@ -2,7 +2,7 @@ Transactions in export Create view and routine options Variables editation Blob download and image display in edit form (important for Editor with hidden fields in select and SQL command) -Add title to Logout, edit (in select) and select (in menu) for style "hever" +Add title to Logout and edit (in select) for style "hever" Export by GET parameters Draggable columns in alter table (thanks to Michal Manak)