diff --git a/adminer/call.inc.php b/adminer/call.inc.php
index b87f9141..ee6aa0cc 100644
--- a/adminer/call.inc.php
+++ b/adminer/call.inc.php
@@ -1,4 +1,6 @@
"MySQL") + $drivers;
if (!defined("DRIVER")) {
define("DRIVER", "server"); // server - backwards compatibility
// MySQLi supports everything, MySQL doesn't support multiple result sets, PDO_MySQL doesn't support orgtable
if (extension_loaded("mysqli")) {
- class Min_DB extends MySQLi {
+ class Min_DB extends \MySQLi {
var $extension = "MySQLi";
function __construct() {
diff --git a/adminer/drivers/oracle.inc.php b/adminer/drivers/oracle.inc.php
index f25c551c..2e69057b 100644
--- a/adminer/drivers/oracle.inc.php
+++ b/adminer/drivers/oracle.inc.php
@@ -1,4 +1,6 @@
_link = new SQLite3($filename);
+ $this->_link = new \SQLite3($filename);
$version = $this->_link->version();
$this->server_info = $version["versionString"];
}
@@ -90,7 +92,7 @@ if (isset($_GET["sqlite"])) {
}
- if (class_exists("Min_SQLite")) {
+ if (class_exists('Adminer\Min_SQLite')) {
class Min_DB extends Min_SQLite {
function __construct() {
diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php
index 68235ab7..8c57c83e 100644
--- a/adminer/dump.inc.php
+++ b/adminer/dump.inc.php
@@ -1,4 +1,6 @@
"ENABLE", "DISABLED" => "DISABLE", "SLAVESIDE_DISABLED" => "DISABLE ON SLAVE");
diff --git a/adminer/file.inc.php b/adminer/file.inc.php
index 0ffe2a89..d2bd2481 100644
--- a/adminer/file.inc.php
+++ b/adminer/file.inc.php
@@ -1,4 +1,6 @@
* @link http://www.coolcode.cn/?action=show&id=128
diff --git a/adminer/index.php b/adminer/index.php
index c5c330d9..8e004ea9 100644
--- a/adminer/index.php
+++ b/adminer/index.php
@@ -7,6 +7,8 @@
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
+namespace Adminer;
+
include "./include/bootstrap.inc.php";
include "./include/tmpfile.inc.php";
diff --git a/adminer/indexes.inc.php b/adminer/indexes.inc.php
index 119e59fe..64efbabb 100644
--- a/adminer/indexes.inc.php
+++ b/adminer/indexes.inc.php
@@ -1,4 +1,6 @@
'تسجيل الدخول',
'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
diff --git a/adminer/lang/bg.inc.php b/adminer/lang/bg.inc.php
index ce250da1..f54322c7 100644
--- a/adminer/lang/bg.inc.php
+++ b/adminer/lang/bg.inc.php
@@ -1,4 +1,6 @@
'Система',
diff --git a/adminer/lang/bn.inc.php b/adminer/lang/bn.inc.php
index cd3ff68e..9d0c9cc8 100644
--- a/adminer/lang/bn.inc.php
+++ b/adminer/lang/bn.inc.php
@@ -1,4 +1,6 @@
'লগইন',
'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।',
diff --git a/adminer/lang/bs.inc.php b/adminer/lang/bs.inc.php
index 83f8deff..94e15344 100644
--- a/adminer/lang/bs.inc.php
+++ b/adminer/lang/bs.inc.php
@@ -1,4 +1,6 @@
'Sistem',
diff --git a/adminer/lang/ca.inc.php b/adminer/lang/ca.inc.php
index 16b0ff0c..31993fc8 100644
--- a/adminer/lang/ca.inc.php
+++ b/adminer/lang/ca.inc.php
@@ -1,4 +1,6 @@
'Inicia la sessió',
'Logout successful.' => 'Desconnexió correcta.',
diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php
index ac2c91de..06a6991e 100644
--- a/adminer/lang/cs.inc.php
+++ b/adminer/lang/cs.inc.php
@@ -1,4 +1,6 @@
'Systém',
diff --git a/adminer/lang/da.inc.php b/adminer/lang/da.inc.php
index 48c3b94c..a112a246 100644
--- a/adminer/lang/da.inc.php
+++ b/adminer/lang/da.inc.php
@@ -1,4 +1,6 @@
'System',
'Server' => 'Server',
diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php
index 89506fa2..8c6ee3eb 100644
--- a/adminer/lang/de.inc.php
+++ b/adminer/lang/de.inc.php
@@ -1,4 +1,6 @@
'Login',
'Logout successful.' => 'Abmeldung erfolgreich.',
diff --git a/adminer/lang/el.inc.php b/adminer/lang/el.inc.php
index 3dd86505..367427d1 100644
--- a/adminer/lang/el.inc.php
+++ b/adminer/lang/el.inc.php
@@ -1,4 +1,6 @@
'Σύστημα',
diff --git a/adminer/lang/en.inc.php b/adminer/lang/en.inc.php
index b4b3b57b..764e2d26 100644
--- a/adminer/lang/en.inc.php
+++ b/adminer/lang/en.inc.php
@@ -1,4 +1,6 @@
array('Too many unsuccessful logins, try again in %d minute.', 'Too many unsuccessful logins, try again in %d minutes.'),
'Query executed OK, %d row(s) affected.' => array('Query executed OK, %d row affected.', 'Query executed OK, %d rows affected.'),
diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php
index 30b5400e..7dbef8b6 100644
--- a/adminer/lang/es.inc.php
+++ b/adminer/lang/es.inc.php
@@ -1,4 +1,6 @@
'Login',
'Logout successful.' => 'Sesión finalizada con éxito.',
diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php
index b7e47d3f..ad386145 100644
--- a/adminer/lang/et.inc.php
+++ b/adminer/lang/et.inc.php
@@ -1,4 +1,6 @@
'Logi sisse',
'Logout successful.' => 'Väljalogimine õnnestus.',
diff --git a/adminer/lang/fa.inc.php b/adminer/lang/fa.inc.php
index 61ea4396..8ceca613 100644
--- a/adminer/lang/fa.inc.php
+++ b/adminer/lang/fa.inc.php
@@ -1,4 +1,6 @@
'سیستم',
diff --git a/adminer/lang/fi.inc.php b/adminer/lang/fi.inc.php
index 29a769c4..52d2c558 100644
--- a/adminer/lang/fi.inc.php
+++ b/adminer/lang/fi.inc.php
@@ -1,4 +1,6 @@
'Järjestelmä',
diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php
index 30fe6686..6d1ad019 100644
--- a/adminer/lang/fr.inc.php
+++ b/adminer/lang/fr.inc.php
@@ -1,4 +1,6 @@
'Authentification',
'Logout successful.' => 'Au revoir !',
diff --git a/adminer/lang/gl.inc.php b/adminer/lang/gl.inc.php
index 22bd6c65..b6b0b093 100644
--- a/adminer/lang/gl.inc.php
+++ b/adminer/lang/gl.inc.php
@@ -1,4 +1,6 @@
'Conectar',
'Logout successful.' => 'Pechouse a sesión con éxito.',
diff --git a/adminer/lang/he.inc.php b/adminer/lang/he.inc.php
index ff7cc466..d5440556 100644
--- a/adminer/lang/he.inc.php
+++ b/adminer/lang/he.inc.php
@@ -1,4 +1,6 @@
'התחברות',
'Logout successful.' => 'ההתחברות הצליחה',
diff --git a/adminer/lang/hu.inc.php b/adminer/lang/hu.inc.php
index be116744..cda89a96 100644
--- a/adminer/lang/hu.inc.php
+++ b/adminer/lang/hu.inc.php
@@ -1,4 +1,6 @@
'Belépés',
'Logout successful.' => 'Sikeres kilépés.',
diff --git a/adminer/lang/id.inc.php b/adminer/lang/id.inc.php
index 03ac8d2e..b66ba255 100644
--- a/adminer/lang/id.inc.php
+++ b/adminer/lang/id.inc.php
@@ -1,4 +1,6 @@
'Sistem',
diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php
index 020b0714..d9925859 100644
--- a/adminer/lang/it.inc.php
+++ b/adminer/lang/it.inc.php
@@ -1,4 +1,6 @@
'Autenticazione',
'Logout successful.' => 'Uscita effettuata con successo.',
diff --git a/adminer/lang/ja.inc.php b/adminer/lang/ja.inc.php
index 88e9d6fd..7deef1db 100644
--- a/adminer/lang/ja.inc.php
+++ b/adminer/lang/ja.inc.php
@@ -1,4 +1,6 @@
'ログイン',
'Logout successful.' => 'ログアウト',
diff --git a/adminer/lang/ka.inc.php b/adminer/lang/ka.inc.php
index 96f037bd..e8e0dc97 100644
--- a/adminer/lang/ka.inc.php
+++ b/adminer/lang/ka.inc.php
@@ -1,4 +1,6 @@
'შესვლა',
'Logout successful.' => 'გამოხვედით სისტემიდან.',
diff --git a/adminer/lang/ko.inc.php b/adminer/lang/ko.inc.php
index 20afaf69..7268e044 100644
--- a/adminer/lang/ko.inc.php
+++ b/adminer/lang/ko.inc.php
@@ -1,4 +1,6 @@
'$1-$3-$5',
'%.3f s' => '%.3f 초',
diff --git a/adminer/lang/lt.inc.php b/adminer/lang/lt.inc.php
index 8223c237..31a17172 100644
--- a/adminer/lang/lt.inc.php
+++ b/adminer/lang/lt.inc.php
@@ -1,4 +1,6 @@
'Sistema',
diff --git a/adminer/lang/lv.inc.php b/adminer/lang/lv.inc.php
index 2a54f14a..2e141591 100644
--- a/adminer/lang/lv.inc.php
+++ b/adminer/lang/lv.inc.php
@@ -1,4 +1,6 @@
'Ieiet',
'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.',
diff --git a/adminer/lang/ms.inc.php b/adminer/lang/ms.inc.php
index e635b700..b02f9410 100644
--- a/adminer/lang/ms.inc.php
+++ b/adminer/lang/ms.inc.php
@@ -1,4 +1,6 @@
'Sistem',
diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php
index b729de4e..838bd7c2 100644
--- a/adminer/lang/nl.inc.php
+++ b/adminer/lang/nl.inc.php
@@ -1,4 +1,6 @@
'Aanmelden',
'Logout successful.' => 'Successvol afgemeld.',
diff --git a/adminer/lang/no.inc.php b/adminer/lang/no.inc.php
index 0fd5cb8c..6c49f60d 100644
--- a/adminer/lang/no.inc.php
+++ b/adminer/lang/no.inc.php
@@ -1,4 +1,6 @@
'System',
'Server' => 'Server',
diff --git a/adminer/lang/pl.inc.php b/adminer/lang/pl.inc.php
index acf43007..f547cb22 100644
--- a/adminer/lang/pl.inc.php
+++ b/adminer/lang/pl.inc.php
@@ -1,4 +1,6 @@
'Rodzaj bazy',
diff --git a/adminer/lang/pt-br.inc.php b/adminer/lang/pt-br.inc.php
index c0c7758b..4ca86b4d 100644
--- a/adminer/lang/pt-br.inc.php
+++ b/adminer/lang/pt-br.inc.php
@@ -1,4 +1,6 @@
'Entrar',
'Logout successful.' => 'Saída bem sucedida.',
diff --git a/adminer/lang/pt.inc.php b/adminer/lang/pt.inc.php
index d8eb4fbb..3b025753 100644
--- a/adminer/lang/pt.inc.php
+++ b/adminer/lang/pt.inc.php
@@ -1,4 +1,6 @@
'Entrar',
'Logout successful.' => 'Sessão terminada com sucesso.',
diff --git a/adminer/lang/ro.inc.php b/adminer/lang/ro.inc.php
index bb6291dc..e09774b9 100644
--- a/adminer/lang/ro.inc.php
+++ b/adminer/lang/ro.inc.php
@@ -1,4 +1,6 @@
'Intră',
'Logout successful.' => 'Ați ieșit cu succes.',
diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php
index 94efdf24..c92f39e4 100644
--- a/adminer/lang/ru.inc.php
+++ b/adminer/lang/ru.inc.php
@@ -1,4 +1,6 @@
'Войти',
'Logout successful.' => 'Вы успешно покинули систему.',
diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php
index 571fcb68..769e98cc 100644
--- a/adminer/lang/sk.inc.php
+++ b/adminer/lang/sk.inc.php
@@ -1,4 +1,6 @@
'Prihlásiť sa',
'Logout successful.' => 'Odhlásenie prebehlo v poriadku.',
diff --git a/adminer/lang/sl.inc.php b/adminer/lang/sl.inc.php
index f1bc6ae8..83da306d 100644
--- a/adminer/lang/sl.inc.php
+++ b/adminer/lang/sl.inc.php
@@ -1,4 +1,6 @@
'Sistem',
diff --git a/adminer/lang/sr.inc.php b/adminer/lang/sr.inc.php
index e56e1617..3b6f10fb 100644
--- a/adminer/lang/sr.inc.php
+++ b/adminer/lang/sr.inc.php
@@ -1,4 +1,6 @@
'Систем',
diff --git a/adminer/lang/sv.inc.php b/adminer/lang/sv.inc.php
index 45cc1eb4..be9defa8 100644
--- a/adminer/lang/sv.inc.php
+++ b/adminer/lang/sv.inc.php
@@ -1,4 +1,6 @@
'System',
diff --git a/adminer/lang/ta.inc.php b/adminer/lang/ta.inc.php
index 0cda8d70..bc09035b 100644
--- a/adminer/lang/ta.inc.php
+++ b/adminer/lang/ta.inc.php
@@ -1,4 +1,6 @@
'நுழை',
'Logout successful.' => 'வெற்றிகரமாய் வெளியேறியாயிற்று.',
diff --git a/adminer/lang/th.inc.php b/adminer/lang/th.inc.php
index ce4243c7..1832a856 100644
--- a/adminer/lang/th.inc.php
+++ b/adminer/lang/th.inc.php
@@ -1,4 +1,6 @@
'เข้าสู่ระบบ',
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
diff --git a/adminer/lang/tr.inc.php b/adminer/lang/tr.inc.php
index 3809fa98..15eea729 100644
--- a/adminer/lang/tr.inc.php
+++ b/adminer/lang/tr.inc.php
@@ -1,4 +1,6 @@
'Sistem',
diff --git a/adminer/lang/uk.inc.php b/adminer/lang/uk.inc.php
index ec468f0c..4aec05b0 100644
--- a/adminer/lang/uk.inc.php
+++ b/adminer/lang/uk.inc.php
@@ -1,4 +1,6 @@
'Система Бази Даних',
diff --git a/adminer/lang/vi.inc.php b/adminer/lang/vi.inc.php
index 2195971d..4d03cdec 100644
--- a/adminer/lang/vi.inc.php
+++ b/adminer/lang/vi.inc.php
@@ -1,4 +1,6 @@
'Hệ thống',
diff --git a/adminer/lang/xx.inc.php b/adminer/lang/xx.inc.php
index 0a6ec476..19a5f504 100644
--- a/adminer/lang/xx.inc.php
+++ b/adminer/lang/xx.inc.php
@@ -1,4 +1,6 @@
'Xx',
diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php
index d7faab56..57ffae97 100644
--- a/adminer/lang/zh-tw.inc.php
+++ b/adminer/lang/zh-tw.inc.php
@@ -1,4 +1,6 @@
'資料庫系統',
diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php
index bf7a89d2..f582d775 100644
--- a/adminer/lang/zh.inc.php
+++ b/adminer/lang/zh.inc.php
@@ -1,4 +1,6 @@
'系统',
diff --git a/adminer/privileges.inc.php b/adminer/privileges.inc.php
index eac36544..d3cd6142 100644
--- a/adminer/privileges.inc.php
+++ b/adminer/privileges.inc.php
@@ -1,4 +1,6 @@
' . lang('Create user') . "";
diff --git a/adminer/procedure.inc.php b/adminer/procedure.inc.php
index 265bd6d2..43b3d4e2 100644
--- a/adminer/procedure.inc.php
+++ b/adminer/procedure.inc.php
@@ -1,4 +1,6 @@
dumpTable("", "");
diff --git a/adminer/table.inc.php b/adminer/table.inc.php
index be73e611..6263518e 100644
--- a/adminer/table.inc.php
+++ b/adminer/table.inc.php
@@ -1,4 +1,6 @@
array("All privileges" => ""));
foreach (get_rows("SHOW PRIVILEGES") as $row) {
diff --git a/adminer/variables.inc.php b/adminer/variables.inc.php
index 16c14798..7b561a83 100644
--- a/adminer/variables.inc.php
+++ b/adminer/variables.inc.php
@@ -1,4 +1,6 @@
homepage()) {
diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php
index c7833b6b..a3562ee8 100644
--- a/editor/include/adminer.inc.php
+++ b/editor/include/adminer.inc.php
@@ -1,4 +1,6 @@
=");
var $_values = array();
diff --git a/editor/include/connect.inc.php b/editor/include/connect.inc.php
index feb69e27..e0183e16 100644
--- a/editor/include/connect.inc.php
+++ b/editor/include/connect.inc.php
@@ -1,2 +1,4 @@
select_db($adminer->database());
diff --git a/editor/include/editing.inc.php b/editor/include/editing.inc.php
index f11a9162..b3eccaab 100644
--- a/editor/include/editing.inc.php
+++ b/editor/include/editing.inc.php
@@ -1,4 +1,6 @@
query("KILL " . number($_POST["kill"]));
diff --git a/lang.php b/lang.php
index b9b805ff..d0ac9b62 100755
--- a/lang.php
+++ b/lang.php
@@ -1,5 +1,7 @@
#!/usr/bin/env php
-
@@ -42,6 +41,10 @@
+
+ plugins/[^/]+\.php
+
+
diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php
index aa9d178c..5807b253 100644
--- a/plugins/drivers/clickhouse.php
+++ b/plugins/drivers/clickhouse.php
@@ -1,4 +1,6 @@
prepend;
- if ($this->langPath && function_exists('get_lang')) { // since Adminer 3.2.0
+ if ($this->langPath) {
$lang = get_lang();
$lang = ($lang == "zh" ? "zh-CN" : ($lang == "zh-tw" ? "zh-TW" : $lang));
if ($lang != "en" && file_exists(sprintf($this->langPath, $lang))) {
diff --git a/plugins/tinymce.php b/plugins/tinymce.php
index a6cad006..d9ef91b4 100644
--- a/plugins/tinymce.php
+++ b/plugins/tinymce.php
@@ -19,13 +19,10 @@ class AdminerTinymce {
}
function head() {
- $lang = "en";
- if (function_exists('get_lang')) { // since Adminer 3.2.0
- $lang = get_lang();
- $lang = ($lang == "zh" ? "zh-cn" : ($lang == "zh-tw" ? "zh" : $lang));
- if (!file_exists(dirname($this->path) . "/langs/$lang.js")) {
- $lang = "en";
- }
+ $lang = get_lang();
+ $lang = ($lang == "zh" ? "zh-cn" : ($lang == "zh-tw" ? "zh" : $lang));
+ if (!file_exists(dirname($this->path) . "/langs/$lang.js")) {
+ $lang = "en";
}
echo script_src($this->path);
?>
diff --git a/plugins/wymeditor.php b/plugins/wymeditor.php
index ca452bcb..b8c82af7 100644
--- a/plugins/wymeditor.php
+++ b/plugins/wymeditor.php
@@ -52,11 +52,8 @@ class AdminerWymeditor {
function editInput($table, $field, $attrs, $value) {
static $lang = "";
if (!$lang && preg_match("~text~", $field["type"]) && preg_match("~_html~", $field["field"])) {
- $lang = "en";
- if (function_exists('get_lang')) { // since Adminer 3.2.0
- $lang = get_lang();
- $lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
- }
+ $lang = get_lang();
+ $lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
return "" . script("
jQuery('#fields-" . js_escape($field["field"]) . "').wymeditor({ updateSelector: '#form [type=\"submit\"]', lang: '$lang'" . ($this->options ? ", $this->options" : "") . " });
");