mirror of
https://github.com/vrana/adminer.git
synced 2026-03-24 21:40:03 +01:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
588af652d4 | ||
|
|
b0c345f9be | ||
|
|
b2677187f1 | ||
|
|
52ee085ca7 | ||
|
|
00459b302a | ||
|
|
17598c7ab3 | ||
|
|
b489cec651 | ||
|
|
6da8bb670a | ||
|
|
e601a3d8ce | ||
|
|
efde7fcc6c | ||
|
|
91b3526e8d | ||
|
|
a3ddd59015 | ||
|
|
7908d86c9f | ||
|
|
0cb41c63c7 | ||
|
|
50de50571d | ||
|
|
de38cb65b6 | ||
|
|
e6cc8bf91e | ||
|
|
be6cf07d26 | ||
|
|
3f979793f7 | ||
|
|
c8878d1652 | ||
|
|
bf24198e68 | ||
|
|
e33ead15e5 | ||
|
|
1087d55913 | ||
|
|
38bdd0a961 | ||
|
|
3dd040abd1 | ||
|
|
3e455a4787 | ||
|
|
95f14bca56 | ||
|
|
121b77e866 |
@@ -1,8 +1,9 @@
|
||||
## Adminer dev
|
||||
## Adminer 5.2.0 (released 2025-04-08)
|
||||
- Autocomplete SQL commands
|
||||
- Do not edit NULL values by Modify (bug #967)
|
||||
- PostgreSQL: Support COPY FROM stdin in SQL query (bug #942)
|
||||
- Fix foreign key actions (regression from 5.1.1)
|
||||
- MySQL: Display number of found rows in group queries (regression from 5.1.1)
|
||||
- PostgreSQL: Support COPY FROM stdin in SQL query (bug #942)
|
||||
- non-MySQL: Parse '--' without trailing space as comment in SQL command (bug SF-842)
|
||||
- MS SQL: Limit one INSERT in export to 1000 rows (bug #983)
|
||||
- CSS: Add logo
|
||||
|
||||
@@ -556,7 +556,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
$create_table = get_val("SHOW CREATE TABLE " . table($table), 1);
|
||||
if ($create_table) {
|
||||
preg_match_all(
|
||||
"~CONSTRAINT ($pattern) FOREIGN KEY ?\\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE (driver()->onActions))?(?: ON UPDATE (driver()->onActions))?~",
|
||||
"~CONSTRAINT ($pattern) FOREIGN KEY ?\\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE (" . driver()->onActions . "))?(?: ON UPDATE (" . driver()->onActions . "))?~",
|
||||
$create_table,
|
||||
$matches,
|
||||
PREG_SET_ORDER
|
||||
|
||||
@@ -527,8 +527,8 @@ ORDER BY conkey, conname") as $row
|
||||
$row['table'] = idf_unescape($match2[4]);
|
||||
}
|
||||
$row['target'] = array_map('Adminer\idf_unescape', array_map('trim', explode(',', $match[3])));
|
||||
$row['on_delete'] = (preg_match("~ON DELETE (driver()->onActions)~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$row['on_update'] = (preg_match("~ON UPDATE (driver()->onActions)~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$row['on_delete'] = (preg_match("~ON DELETE (" . driver()->onActions . ")~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$row['on_update'] = (preg_match("~ON UPDATE (" . driver()->onActions . ")~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$return[$row['conname']] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
||||
$result
|
||||
);
|
||||
if (!$row["drop"]) {
|
||||
$error = "$error<br>" . lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.'); //! no partitioning
|
||||
$error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.'); //! no partitioning
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@ class Adminer {
|
||||
return get_databases($flush);
|
||||
}
|
||||
|
||||
/** Print links after list of plugins */
|
||||
function pluginsLinks(): void {
|
||||
}
|
||||
|
||||
/** Operators used in select
|
||||
* @return list<string> operators
|
||||
*/
|
||||
@@ -1022,13 +1026,15 @@ class Adminer {
|
||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||
echo "jushLinks.$val = jushLinks." . JUSH . ";\n";
|
||||
}
|
||||
$tablesColumns = array_fill_keys(array_keys($tables), array());
|
||||
foreach (driver()->allFields() as $table => $fields) {
|
||||
foreach ($fields as $field) {
|
||||
$tablesColumns[$table][] = $field["field"];
|
||||
if (isset($_GET["sql"]) || isset($_GET["trigger"]) || isset($_GET["check"])) {
|
||||
$tablesColumns = array_fill_keys(array_keys($tables), array());
|
||||
foreach (driver()->allFields() as $table => $fields) {
|
||||
foreach ($fields as $field) {
|
||||
$tablesColumns[$table][] = $field["field"];
|
||||
}
|
||||
}
|
||||
echo "addEventListener('DOMContentLoaded', () => { autocompleter = jush.autocompleteSql('" . idf_escape("") . "', " . json_encode($tablesColumns) . "); });\n";
|
||||
}
|
||||
echo "addEventListener('DOMContentLoaded', () => { autocompleter = jush.autocompleteSql('" . idf_escape("") . "', " . json_encode($tablesColumns) . "); });\n";
|
||||
}
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
@@ -93,10 +93,22 @@ if (
|
||||
echo "<div class='plugins'>\n";
|
||||
echo "<h3>" . lang('Loaded plugins') . "</h3>\n<ul>\n";
|
||||
foreach (adminer()->plugins as $plugin) {
|
||||
$reflection = new \ReflectionObject($plugin);
|
||||
echo "<li><b>" . get_class($plugin) . "</b>" . h(preg_match('~^/[\s*]+(.+)~', $reflection->getDocComment(), $match) ? ": $match[1]" : "") . "\n";
|
||||
$description = (method_exists($plugin, 'description') ? $plugin->description() : "");
|
||||
if (!$description) {
|
||||
$reflection = new \ReflectionObject($plugin);
|
||||
if (preg_match('~^/[\s*]+(.+)~', $reflection->getDocComment(), $match)) {
|
||||
$description = $match[1];
|
||||
}
|
||||
}
|
||||
$screenshot = (method_exists($plugin, 'screenshot') ? $plugin->screenshot() : "");
|
||||
echo "<li><b>" . get_class($plugin) . "</b>"
|
||||
. h($description ? ": $description" : "")
|
||||
. ($screenshot ? " (<a href='" . h($screenshot) . "'" . target_blank() . ">" . lang('screenshot') . "</a>)" : "")
|
||||
. "\n"
|
||||
;
|
||||
}
|
||||
echo "</ul>\n";
|
||||
adminer()->pluginsLinks();
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ function create_routine($routine, array $row): string {
|
||||
ksort($fields); // enforce fields order
|
||||
foreach ($fields as $field) {
|
||||
if ($field["field"] != "") {
|
||||
$set[] = (preg_match("~^(driver()->inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
$set[] = (preg_match("~^(" . driver()->inout . ")\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
$definition = rtrim($row["definition"], ";");
|
||||
@@ -499,8 +499,8 @@ function format_foreign_key(array $foreign_key): string {
|
||||
. ($ns != "" && $ns != $_GET["ns"] ? idf_escape($ns) . "." : "")
|
||||
. idf_escape($foreign_key["table"])
|
||||
. " (" . implode(", ", array_map('Adminer\idf_escape', $foreign_key["target"])) . ")" //! reuse $name - check in older MySQL versions
|
||||
. (preg_match("~^(driver()->onActions)\$~", $foreign_key["on_delete"]) ? " ON DELETE $foreign_key[on_delete]" : "")
|
||||
. (preg_match("~^(driver()->onActions)\$~", $foreign_key["on_update"]) ? " ON UPDATE $foreign_key[on_update]" : "")
|
||||
. (preg_match("~^(" . driver()->onActions . ")\$~", $foreign_key["on_delete"]) ? " ON DELETE $foreign_key[on_delete]" : "")
|
||||
. (preg_match("~^(" . driver()->onActions . ")\$~", $foreign_key["on_update"]) ? " ON UPDATE $foreign_key[on_update]" : "")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,31 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
// the overridable methods don't use return type declarations so that plugins can be compatible with PHP 5
|
||||
abstract class Plugin {
|
||||
/** @var array<literal-string, string|list<string>>[] */ protected static $translations = array(); // key is language code
|
||||
/** @var array<literal-string, string|list<string>>[] */ protected $translations = array(); // key is language code
|
||||
|
||||
/** Get plain text plugin description; empty string means to use the first line of class doc-comment
|
||||
* @return string
|
||||
*/
|
||||
function description() {
|
||||
return $this->lang('');
|
||||
}
|
||||
|
||||
/** Get URL of plugin screenshot
|
||||
* @return string
|
||||
*/
|
||||
function screenshot() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** Translate a string from static::$translations; use Adminer\lang() for strings used by Adminer
|
||||
* @param literal-string $idf
|
||||
* @param float|string $number
|
||||
*/
|
||||
protected function lang(string $idf, $number = null) {
|
||||
protected function lang(string $idf, $number = null): string {
|
||||
$args = func_get_args();
|
||||
$args[0] = idx(static::$translations[LANG], $idf) ?: $idf;
|
||||
$args[0] = idx($this->translations[LANG], $idf) ?: $idf;
|
||||
return call_user_func_array('Adminer\lang_format', $args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
const VERSION = "5.2.0-dev";
|
||||
const VERSION = "5.2.0";
|
||||
|
||||
@@ -13,9 +13,6 @@ Lang::$translations = array(
|
||||
'Logged as: %s' => 'Přihlášen jako: %s',
|
||||
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Díky za použití Admineru, <a href="https://www.adminer.org/cs/donation/">přispějte</a> na vývoj.',
|
||||
'Loaded plugins' => 'Nahrané pluginy',
|
||||
'%s must <a%s>return an array</a>.' => '%s musí <a%s>vracet pole</a>.',
|
||||
'<a%s>Configure</a> %s in %s.' => '<a%s>Nakonfigurujte</a> %s v %s.',
|
||||
'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
|
||||
'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
|
||||
@@ -352,6 +349,11 @@ Lang::$translations = array(
|
||||
'Check has been created.' => 'Kontrola byla vytvořena.',
|
||||
'Check has been altered.' => 'Kontrola byla změněna.',
|
||||
'Check has been dropped.' => 'Kontrola byla odstraněna.',
|
||||
|
||||
'Loaded plugins' => 'Nahrané pluginy',
|
||||
'%s must <a%s>return an array</a>.' => '%s musí <a%s>vracet pole</a>.',
|
||||
'<a%s>Configure</a> %s in %s.' => '<a%s>Nakonfigurujte</a> %s v %s.',
|
||||
'screenshot' => 'obrázek',
|
||||
);
|
||||
|
||||
// run `php ../../lang.php cs` to update this file
|
||||
|
||||
@@ -137,6 +137,7 @@ Lang::$translations = array(
|
||||
'User has been created.' => 'Benutzer wurde erstellt.',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => 'Spalte',
|
||||
'Columns' => 'Spalten',
|
||||
'Routine' => 'Routine',
|
||||
'Grant' => 'Erlauben',
|
||||
'Revoke' => 'Widerrufen',
|
||||
@@ -305,6 +306,7 @@ Lang::$translations = array(
|
||||
'Loaded plugins' => 'Geladene Plugins',
|
||||
'%s must <a%s>return an array</a>.' => '%s muss <a%s>ein Array zurückgeben</a>.',
|
||||
'<a%s>Configure</a> %s in %s.' => '<a%s>Konfigure</a> %s mit %s.',
|
||||
'screenshot' => 'Screenshot',
|
||||
);
|
||||
|
||||
// run `php ../../lang.php de` to update this file
|
||||
|
||||
@@ -11,7 +11,7 @@ Lang::$translations = array(
|
||||
'Loaded plugins' => '読込済プラグイン',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Adminerのご利用ありがとうございました。(寄付は<a href="https://www.adminer.org/en/donation/">こちら</a>)',
|
||||
'%s must <a%s>return an array</a>.' => '%s は<a%s>配列を返す</a>必要があります。',
|
||||
'<a%s>Configure</a> %s in %s.' => '%2$s の %1$s <a%s>を設定してください</a>。',
|
||||
'<a%s>Configure</a> %s in %s.' => '%2$s の %1$s を<a%s>設定</a>してください。',
|
||||
'There is a space in the input password which might be the cause.' => '入力されたパスワードに空白が含まれているので、それが原因かもしれません。',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer はパスワードのないデータベースへの接続には対応していません。(<a href="https://www.adminer.org/en/password/"%s>詳細</a>)',
|
||||
'Database does not support password.' => 'データベースがパスワードに対応していません。',
|
||||
@@ -107,8 +107,8 @@ Lang::$translations = array(
|
||||
'Foreign key has been dropped.' => '外部キーを削除しました。',
|
||||
'Foreign key has been altered.' => '外部キーを変更しました。',
|
||||
'Foreign key has been created.' => '外部キーを作成しました。',
|
||||
'Foreign key' => '外キー',
|
||||
'Target table' => 'テーブル',
|
||||
'Foreign key' => '外部キー',
|
||||
'Target table' => '対象テーブル',
|
||||
'Change' => '変更',
|
||||
'Source' => 'ソース',
|
||||
'Target' => 'ターゲット',
|
||||
@@ -158,6 +158,7 @@ Lang::$translations = array(
|
||||
'User has been created.' => 'ユーザを作成しました。',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => '列',
|
||||
'Columns' => '列',
|
||||
'Routine' => 'ルーチン',
|
||||
'Grant' => '権限の付与',
|
||||
'Revoke' => '権限の取消し',
|
||||
@@ -307,6 +308,8 @@ Lang::$translations = array(
|
||||
'Check has been created.' => 'チェックを作成しました。',
|
||||
'Check has been altered.' => 'チェックを変更しました。',
|
||||
'Check has been dropped.' => 'チェックを削除しました。',
|
||||
|
||||
'screenshot' => 'スクリーンショット',
|
||||
);
|
||||
|
||||
// run `php ../../lang.php ja` to update this file
|
||||
|
||||
@@ -13,9 +13,6 @@ Lang::$translations = array(
|
||||
'Logged as: %s' => 'Xx: %s',
|
||||
'Logout successful.' => 'Xx.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Xx <a href="https://www.adminer.org/en/donation/">xx</a>.',
|
||||
'Loaded plugins' => 'Xx',
|
||||
'%s must <a%s>return an array</a>.' => '%s xx <a%s>xx</a>.',
|
||||
'<a%s>Configure</a> %s in %s.' => '<a%s>Xx</a> %s xx %s.',
|
||||
'Invalid credentials.' => 'Xx.',
|
||||
'There is a space in the input password which might be the cause.' => 'Xx.',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
|
||||
@@ -354,6 +351,11 @@ Lang::$translations = array(
|
||||
'Check has been created.' => 'Xx.',
|
||||
'Check has been altered.' => 'Xx.',
|
||||
'Check has been dropped.' => 'Xx.',
|
||||
|
||||
'Loaded plugins' => 'Xx',
|
||||
'%s must <a%s>return an array</a>.' => '%s xx <a%s>xx</a>.',
|
||||
'<a%s>Configure</a> %s in %s.' => '<a%s>Xx</a> %s xx %s.',
|
||||
'screenshot' => 'xx',
|
||||
);
|
||||
|
||||
// run `php ../../lang.php xx` to update this file
|
||||
|
||||
@@ -72,7 +72,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.icon:hover { background-color: red; }
|
||||
.size { width: 7ex; }
|
||||
.help { cursor: help; }
|
||||
.footer { position: sticky; bottom: 0; margin: 1em -20px .5em 0; box-shadow: 0 -5px 10px 10px var(--bg); }
|
||||
.footer { position: sticky; bottom: 0; margin: 23px -20px .5em 0; box-shadow: 0 -5px 10px 10px var(--bg); }
|
||||
.footer > div { background: var(--bg); padding: 0 0 .5em; }
|
||||
.footer fieldset { margin-top: 0; }
|
||||
.links a { white-space: nowrap; margin-right: 20px; }
|
||||
|
||||
@@ -324,12 +324,12 @@ if ($project == "editor") {
|
||||
$file = preg_replace('~;.\.\/externals/jush/jush(-dark)?\.css~', '', $file);
|
||||
$file = preg_replace('~compile_file\(\'\.\./(externals/jush/modules/jush\.js)[^)]+\)~', "''", $file);
|
||||
}
|
||||
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
|
||||
$file = preg_replace_callback("~(?<!>)lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
|
||||
$file = preg_replace_callback('~\b(include|require) "([^"]*" . LANG . ".inc.php)";~', 'put_file_lang', $file);
|
||||
$file = str_replace("\r", "", $file);
|
||||
if ($_SESSION["lang"]) {
|
||||
// single language version
|
||||
$file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
|
||||
$file = preg_replace_callback("~(<\\?php\\s*echo )?(?<!>)lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
|
||||
$file = str_replace("switch_lang();", "", $file);
|
||||
$file = str_replace('<?php echo LANG; ?>', $_SESSION["lang"], $file);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ outline:0;background:url(//www.bradezone.com/random/adminer_logo.gif) no-repeat;
|
||||
* html #lang{padding-top:10px;height:30px}
|
||||
* html form#form{height:100%}
|
||||
#logins a,#tables a{background: none}
|
||||
.logout{color:#fff}
|
||||
.logout{color:#fff;background-color:#333;box-shadow:0 0 5px 5px #333;z-index:1}
|
||||
#logout{color:#333;text-decoration:none;border-bottom:1px dotted}
|
||||
#logout:hover{border-color:#333;background:#333;color:#fff}
|
||||
.js .column{background:#ddd}
|
||||
|
||||
@@ -240,6 +240,8 @@ th {
|
||||
|
||||
.logout {
|
||||
z-index: 2;
|
||||
background-color: #f2eee1;
|
||||
box-shadow: 0 0 5px 5px #f2eee1;
|
||||
}
|
||||
|
||||
.js .column {
|
||||
|
||||
@@ -411,6 +411,7 @@ tbody tr:nth-child(n):hover th {
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
position: fixed;
|
||||
box-shadow: none;
|
||||
}
|
||||
#lang {
|
||||
top: 0;
|
||||
|
||||
@@ -1077,6 +1077,10 @@ body > form{
|
||||
/*position: relative;*/
|
||||
}
|
||||
|
||||
.logout{
|
||||
z-index: 5000;
|
||||
}
|
||||
|
||||
#lang {
|
||||
z-index: 5000;
|
||||
position: absolute;
|
||||
|
||||
@@ -413,6 +413,8 @@ thead td abbr, thead td sup, thead th acronym, thead th sup {
|
||||
|
||||
.logout {
|
||||
top: 28px;
|
||||
background-color: #31587d;
|
||||
box-shadow: 0 0 3px 3px #31587d;
|
||||
}
|
||||
|
||||
.js .column {
|
||||
|
||||
@@ -558,6 +558,8 @@ input[name="delete"]:hover, input[name="drop"]:hover {
|
||||
|
||||
.logout {
|
||||
color: #fff;
|
||||
background-color: #333;
|
||||
box-shadow: 0 0 4px 4px #333;
|
||||
margin-top: 0.7em;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,8 @@ th {
|
||||
|
||||
.logout {
|
||||
z-index: 5;
|
||||
background-color: #f2eee1;
|
||||
box-shadow: 0 0 4px 4px #f2eee1;
|
||||
}
|
||||
|
||||
.js .column {
|
||||
|
||||
@@ -318,6 +318,8 @@ input[name=logout]:hover {
|
||||
.logout {
|
||||
position: fixed;
|
||||
z-index:3;
|
||||
background-color: #48A5BF;
|
||||
box-shadow: 0 0 4px 4px #48A5BF;
|
||||
}
|
||||
|
||||
.logout form {
|
||||
|
||||
@@ -69,6 +69,7 @@ p.tabs{margin:0 20px 0 0}
|
||||
fieldset{border:1px solid #999;border-radius:5px;display:inline;margin:.8em .5em 0 0;padding:.5em .8em;vertical-align:top}
|
||||
a{color:#369}
|
||||
a:hover{color:#28c}
|
||||
.logout{background:transparent;box-shadow:none}
|
||||
#logout,#logins a,#logins a:link,#breadcrumb a,#breadcrumb a:link,.logout a,.logout a:link,.tabs a,.tabs a:link{display:inline-block;border:1px solid #667eac;border-radius:4px;padding:3px 8px;margin:2px 0;vertical-align:middle;text-decoration:none;color:#fff;background:#7abcff;background:-moz-linear-gradient(top,#7abcff 0,#60abf8 44%,#4096ee 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#7abcff),color-stop(44%,#60abf8),color-stop(100%,#4096ee));background:-webkit-linear-gradient(top,#7abcff 0,#60abf8 44%,#4096ee 100%);background:-o-linear-gradient(top,#7abcff 0,#60abf8 44%,#4096ee 100%);background:-ms-linear-gradient(top,#7abcff 0,#60abf8 44%,#4096ee 100%);background:linear-gradient(to bottom,#7abcff 0,#60abf8 44%,#4096ee 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7abcff',endColorstr='#4096ee',GradientType=0)}
|
||||
.logout a,.logout a:link,#logout{padding:3px 4px}
|
||||
#logout:hover,#logins a:hover,#tables a:hover,#breadcrumb a:hover,.logout a:hover,.tabs a:hover{color:#fff;text-decoration:none;background:#93c9ff;background:-moz-linear-gradient(top,#93c9ff 0,#79b8f7 44%,#57a2ed 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#93c9ff),color-stop(44%,#79b8f7),color-stop(100%,#57a2ed));background:-webkit-linear-gradient(top,#93c9ff 0,#79b8f7 44%,#57a2ed 100%);background:-o-linear-gradient(top,#93c9ff 0,#79b8f7 44%,#57a2ed 100%);background:-ms-linear-gradient(top,#93c9ff 0,#79b8f7 44%,#57a2ed 100%);background:linear-gradient(to bottom,#93c9ff 0,#79b8f7 44%,#57a2ed 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#93c9ff',endColorstr='#57a2ed',GradientType=0)}
|
||||
|
||||
@@ -244,6 +244,17 @@ Adminer generates simple HTML and styles it with basic CSS, respecting user pref
|
||||
Users can customize styles via `adminer.css`.
|
||||
If styling an element without a class name is difficult, I generally accept patches that add meaningful class names.
|
||||
|
||||
## Translations
|
||||
|
||||
All user-visible strings should be translatable using `lang('')`.
|
||||
This extracts them for translation and applies translations if available.
|
||||
|
||||
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
|
||||
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
|
||||
|
||||
Plugins extending [`Adminer\Plugin`](/adminer/include/plugin.inc.php) can use `$this->lang()` and store translations in `static $translations = array('en' => array('' => 'Plugin description'))`.
|
||||
The website translations are managed at https://www.adminer.org/en/translations/.
|
||||
|
||||
## Compilation
|
||||
|
||||
Adminer’s source code is divided into a manageable number of reasonably small files.
|
||||
@@ -273,15 +284,6 @@ I do not review logs with this information, and no one else has access to the se
|
||||
A [plugin](/plugins/version-noverify.php) disables version checks, but users should verify versions by other means to ensure security updates.
|
||||
There's also a [plugin](/plugins/version-github.php) checking for new versions [from GitHub](https://github.com/vrana/adminer/releases).
|
||||
|
||||
## Translations
|
||||
|
||||
All user-visible strings should be translatable using `lang('')`.
|
||||
This extracts them for translation and applies translations if available.
|
||||
|
||||
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
|
||||
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
|
||||
The website translations are managed separately via Google Sheets.
|
||||
|
||||
## Commits
|
||||
|
||||
Every commit should do only one thing and be as small as possible.
|
||||
|
||||
@@ -32,4 +32,5 @@ if (adminer()->homepage()) {
|
||||
echo "</div>\n";
|
||||
echo "</form>\n";
|
||||
echo script("tableCheck();");
|
||||
adminer()->pluginsLinks();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ class Adminer {
|
||||
return get_databases($flush);
|
||||
}
|
||||
|
||||
function pluginsLinks(): void {
|
||||
}
|
||||
|
||||
function queryTimeout() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
2
externals/PhpShrink
vendored
2
externals/PhpShrink
vendored
Submodule externals/PhpShrink updated: 7a4c6ac9ac...bc2ad3a1d2
2
externals/jush
vendored
2
externals/jush
vendored
Submodule externals/jush updated: c2c986e0d7...9fdd75b3cd
12
lang.php
12
lang.php
@@ -22,7 +22,7 @@ foreach (
|
||||
) as $include
|
||||
) {
|
||||
$file = file_get_contents($include);
|
||||
if (preg_match_all("~lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) { // lang() always uses apostrophes
|
||||
if (preg_match_all("~[^>]lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) { // lang() always uses apostrophes
|
||||
$messages_all += array_combine($matches[1], $matches[2]);
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,12 @@ foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.ph
|
||||
if ($lang != "xx") {
|
||||
foreach (glob(__DIR__ . "/plugins/*.php") as $filename) {
|
||||
$file = file_get_contents($filename);
|
||||
if (preg_match_all("~\\\$this->lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) {
|
||||
$messages = array_combine($matches[1], $matches[2]);
|
||||
$file = preg_replace("~(static \\\$translations = array\\((?!.*'$lang').*?)\t\\);~s", "\\1\t\t'$lang' => array(\n\t\t),\n\t);", $file);
|
||||
if (preg_match('~extends Adminer\\\\Plugin~', $file)) {
|
||||
preg_match_all("~\\\$this->lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches);
|
||||
$messages = array("''" => "") + array_combine($matches[1], $matches[2]);
|
||||
$file = preg_replace("~(\\\$translations = array\\((?!.*'$lang').*?)\t\\);~s", "\\1\t\t'$lang' => array(\n\t\t),\n\t);", $file);
|
||||
file_put_contents($filename, $file);
|
||||
update_translations($lang, $messages, $filename, "~(static \\\$translations = array\\(.*'$lang' => array\\(\n)(.*)(?=^\t\t\\),)~msU", "\t\t\t");
|
||||
update_translations($lang, $messages, $filename, "~(\\\$translations = array\\(.*'$lang' => array\\(\n)(.*)(?=^\t\t\\),)~msU", "\t\t\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,6 +87,7 @@ function update_translations($lang, $messages, $filename, $pattern, $tabs = "\t"
|
||||
return $prefix . $s;
|
||||
}, $file, -1, $count, PREG_OFFSET_CAPTURE);
|
||||
if ($s != $file) {
|
||||
$s = str_replace("array(\n\t\t\t'' => null,\n\t\t),", "array('' => null),", $s);
|
||||
file_put_contents($filename, $s);
|
||||
echo "$filename updated.\n";
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDotJs {
|
||||
class AdminerDotJs extends Adminer\Plugin {
|
||||
const FILENAME = "adminer.js";
|
||||
|
||||
function head($dark = null) {
|
||||
@@ -16,4 +16,12 @@ class AdminerDotJs {
|
||||
echo Adminer\script_src(self::FILENAME . "?v=" . crc32(file_get_contents(self::FILENAME))), "\n";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Nahraje adminer.js'),
|
||||
'de' => array('' => 'Laden Sie adminer.js'),
|
||||
'pl' => array('' => 'Wczytuj adminer.js'),
|
||||
'ro' => array('' => 'Încarcă adminer.js'),
|
||||
'ja' => array('' => 'adminer.js を読込み'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
/** Display links to tables referencing current row, same as in Adminer Editor
|
||||
* @link https://www.adminer.org/static/plugins/backward-keys.png
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerBackwardKeys {
|
||||
class AdminerBackwardKeys extends Adminer\Plugin {
|
||||
// this is copy-pasted from Adminer Editor
|
||||
|
||||
function backwardKeys($table, $tableName) {
|
||||
@@ -52,4 +51,15 @@ ORDER BY ORDINAL_POSITION", null, "") as $row
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/backward-keys.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zobrazí odkazy na tabulky odkazující aktuální řádek, stejně jako Adminer Editor'),
|
||||
'de' => array('' => 'Links zu Tabellen anzeigen die auf die aktuelle Zeile verweisen, wie im Adminer Editor'),
|
||||
'ja' => array('' => 'Adminer Editor と同様に、カレント行を参照しているテーブルへのリンクを表示'),
|
||||
'pl' => array('' => 'Wyświetlaj linki do tabel odnoszących się do bieżącego wiersza, tak samo jak w Edytorze administratora'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerBeforeUnload {
|
||||
class AdminerBeforeUnload extends Adminer\Plugin {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -30,4 +30,11 @@ onbeforeunload = () => editChanged;
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zobrazí potvrzení před odnahráním stránky, pokud bylo změněno formulářové políčko'),
|
||||
'de' => array('' => 'Zeigt eine Bestätigung an bevor die Seite neu geladen wird, wenn ein Formularfeld geändert wurde'),
|
||||
'ja' => array('' => 'フォームの列が変更された時、ページを再読込みする前に確認を表示'),
|
||||
'pl' => array('' => 'Wyświetlaj potwierdzenie przed rozładowaniem strony, jeśli pole formularza zostało zmienione'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
/** Use Codemirror 5 for syntax highlighting and SQL <textarea> including type-ahead of keywords and tables
|
||||
/** Use CodeMirror 5 for syntax highlighting and <textarea> including type-ahead of keywords and tables
|
||||
* @link https://codemirror.net/5/
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerCodemirror {
|
||||
class AdminerCodemirror extends Adminer\Plugin {
|
||||
private $root;
|
||||
private $minified;
|
||||
|
||||
@@ -97,4 +97,15 @@ addEventListener('DOMContentLoaded', () => {
|
||||
<?php
|
||||
return true;
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/codemirror.gif";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Použít CodeMirror 5 pro zvýrazňování syntaxe a <textarea> včetně našeptávání klíčových slov a tabulek'),
|
||||
'de' => array('' => 'CodeMirror 5 verwenden für die Syntaxhervorhebung und <textarea> einschließlich der Überschrift von Schlüsselwörtern und Tabellen'),
|
||||
'ja' => array('' => 'CodeMirror 5 を用い、キーワードやテーブルを含む構文や <textarea> を強調表示'),
|
||||
'pl' => array('' => 'Użyj CodeMirror 5 do podświetlania składni i <textarea>, uwzględniając wcześniejsze wpisywanie słów kluczowych i tabel'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,24 +51,18 @@ class AdminerConfig extends Adminer\Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
function navigation() {
|
||||
if (Adminer\connection()) { // don't display on login page
|
||||
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', Adminer\ME), 0, -1);
|
||||
?>
|
||||
<style>
|
||||
#configlink { position: absolute; top: -2.6em; left: 17.8em; }
|
||||
#configlink a { font-size: 150%; }
|
||||
@media all and (max-width: 800px) {
|
||||
#configlink { top: 5em; left: auto; right: 20px; }
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
echo "<div id='configlink'><a href='" . Adminer\h($link) . "&config=' title='" . $this->lang('Configuration') . "'>⚙</a></div>\n";
|
||||
}
|
||||
function pluginsLinks() {
|
||||
$link = preg_replace('~\b(db|ns)=[^&]*&~', '', Adminer\ME);
|
||||
echo "<p><a href='" . Adminer\h($link) . "config='>" . $this->lang('Configuration') . "</a>\n";
|
||||
}
|
||||
|
||||
protected static $translations = array(
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/config.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array(
|
||||
'' => 'Konfigurace možností uživateli a jejich uložení do cookie',
|
||||
'Configuration' => 'Konfigurace',
|
||||
'Configuration saved.' => 'Konfigurace uložena.',
|
||||
'Only some plugins support configuration, e.g. %s.' => 'Konfiguraci podporují jen některé pluginy, např. %s.',
|
||||
@@ -84,5 +78,23 @@ class AdminerConfig extends Adminer\Plugin {
|
||||
'Use %s if exists' => 'Użyj %s, jeśli istnieje',
|
||||
'Use builtin design' => 'Użyj wbudowanego wyglądu',
|
||||
),
|
||||
'de' => array(
|
||||
'' => 'Optionen durch den Endbenutzer konfigurieren und dies in einem Cookie speichern',
|
||||
'Configuration' => 'Konfiguration',
|
||||
'Configuration saved.' => 'Konfiguration gespeichert.',
|
||||
'Only some plugins support configuration, e.g. %s.' => 'Nur einige Plugins unterstützen die Konfiguration, z.B. %s.',
|
||||
'Design' => 'Design',
|
||||
'Use %s if exists' => '%s verwenden, falls vorhanden',
|
||||
'Use builtin design' => 'Standard Design verwenden',
|
||||
),
|
||||
'ja' => array(
|
||||
'' => 'ユーザオプションを設定し cookie に保存',
|
||||
'Configuration' => '設定',
|
||||
'Configuration saved.' => '設定を保存しました。',
|
||||
'Only some plugins support configuration, e.g. %s.' => '設定変更に対応しているのは一部のプラグインのみです。例: %s。',
|
||||
'Design' => 'デザイン',
|
||||
'Use %s if exists' => 'あれば %s を使う',
|
||||
'Use builtin design' => '組込みのデザインを使う',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDarkSwitcher {
|
||||
class AdminerDarkSwitcher extends Adminer\Plugin {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -38,4 +38,15 @@ if (saved) {
|
||||
. Adminer\script("if (adminerDark != null) adminerDarkSet(); qsl('big').onclick = adminerDarkSwitch;") . "\n"
|
||||
;
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/dark-switcher.gif";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Dovoluje přepínání světlého a tmavého vzhledu'),
|
||||
'de' => array('' => 'Umschalten zwischen hellem und dunklem Design erlauben'),
|
||||
'ja' => array('' => 'ダークモードへの切替え'),
|
||||
'pl' => array('' => 'Zezwalaj na przełączanie trybu jasnego i ciemnego'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDatabaseHide {
|
||||
class AdminerDatabaseHide extends Adminer\Plugin {
|
||||
protected $disabled;
|
||||
|
||||
/**
|
||||
@@ -25,4 +25,12 @@ class AdminerDatabaseHide {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Skryje některé databáze z rozhraní – pouze vylepší vzhled, nikoliv bezpečnost'),
|
||||
'de' => array('' => 'Verstecken Sie einige Datenbanken vor der Benutzeroberfläche – nur um das Design zu verbessern, verbessert nicht die Sicherheit'),
|
||||
'pl' => array('' => 'Ukryj niektóre bazy danych w interfejsie – tylko po to, aby ulepszyć motyw, a nie wtyczkę zabezpieczającą'),
|
||||
'ro' => array('' => 'Ascundeți unele baze de date din interfață - doar pentru a îmbunătăți designul, nu un plugin de securitate'),
|
||||
'ja' => array('' => '一部データベースを UI 上で表示禁止 (デザイン的な効果のみでセキュリティ的には効果なし)'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDesigns {
|
||||
class AdminerDesigns extends Adminer\Plugin {
|
||||
protected $designs;
|
||||
|
||||
/**
|
||||
@@ -38,4 +38,16 @@ class AdminerDesigns {
|
||||
echo Adminer\input_token();
|
||||
echo "</form>\n";
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/designs.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Umožní změnit vzhled'),
|
||||
'de' => array('' => 'Designwechsel ermöglichen'),
|
||||
'pl' => array('' => 'Zezwalaj na przełączanie motywów'),
|
||||
'ro' => array('' => 'Permiteți comutarea designurilor'),
|
||||
'ja' => array('' => 'テーマ設定を有効化'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ if (isset($_GET["imap"])) {
|
||||
function __construct($result) {
|
||||
$this->result = $result;
|
||||
$this->num_rows = count($result);
|
||||
$this->fields = array_keys(idx($result, 0, array()));
|
||||
$this->fields = array_keys(idx($result, 0, array()));
|
||||
}
|
||||
|
||||
function fetch_assoc() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpAlter {
|
||||
class AdminerDumpAlter extends Adminer\Plugin {
|
||||
|
||||
function dumpFormat() {
|
||||
if (Adminer\DRIVER == 'server') {
|
||||
@@ -167,4 +167,12 @@ DROP PROCEDURE adminer_alter;
|
||||
$this->dumpAlter();
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Exportuje jednu databázi (např. vývojovou) tak, že může být synchronizována s jinou databází (např. produkční)'),
|
||||
'de' => array('' => 'Exportiert eine Datenbank (z. B. Entwicklung), damit sie mit einer anderen Datenbank (z. B. Produktion) synchronisiert werden kann'),
|
||||
'pl' => array('' => 'Eksportuje jedną bazę danych (np. programistyczną), aby można ją było zsynchronizować z inną bazą danych (np. produkcyjną)'),
|
||||
'ro' => array('' => 'Exportați o bază de date (de exemplu, development) astfel încât să poată fi sincronizată cu o altă bază de date (de exemplu, de producție)'),
|
||||
'ja' => array('' => 'データベース (開発用など) をエクスポートし、別のデータベース (本番用など) と同期'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpBz2 {
|
||||
class AdminerDumpBz2 extends Adminer\Plugin {
|
||||
protected $filename, $fp;
|
||||
|
||||
function dumpOutput() {
|
||||
@@ -36,4 +36,12 @@ class AdminerDumpBz2 {
|
||||
ob_start(array($this, '_bz2'), 1e6);
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Export do formátu Bzip2'),
|
||||
'de' => array('' => 'Export im Bzip2-Format'),
|
||||
'pl' => array('' => 'Zrzuć do formatu Bzip2'),
|
||||
'ro' => array('' => 'Dump în format Bzip2'),
|
||||
'ja' => array('' => 'Bzip2 形式でエクスポート'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,17 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpDate {
|
||||
class AdminerDumpDate extends Adminer\Plugin {
|
||||
|
||||
function dumpFilename($identifier) {
|
||||
return Adminer\friendly_url(($identifier != "" ? $identifier : (Adminer\SERVER != "" ? Adminer\SERVER : "localhost")) . "-" . Adminer\get_val("SELECT NOW()"));
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Do názvu souboru s exportem přidá aktuální datum a čas'),
|
||||
'de' => array('' => 'Aktuelles Datum und die aktuelle Uhrzeit in den Namen der Exportdatei einfügen'),
|
||||
'pl' => array('' => 'Dołącz bieżącą datę i godzinę do nazwy pliku eksportu'),
|
||||
'ro' => array('' => 'Includeți data și ora curentă în numele fișierului de export'),
|
||||
'ja' => array('' => 'エクスポートファイル名に現在日時を含める'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpJson {
|
||||
class AdminerDumpJson extends Adminer\Plugin {
|
||||
protected $database = false;
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -57,4 +57,12 @@ class AdminerDumpJson {
|
||||
echo "}\n";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Export do formátu JSON'),
|
||||
'de' => array('' => 'Export im JSON-Format'),
|
||||
'pl' => array('' => 'Zrzuć do formatu JSON'),
|
||||
'ro' => array('' => 'Dump în format JSON'),
|
||||
'ja' => array('' => 'JSON 形式でエクスポート'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpPhp {
|
||||
class AdminerDumpPhp extends Adminer\Plugin {
|
||||
protected $output = array();
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -45,4 +45,12 @@ class AdminerDumpPhp {
|
||||
echo ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Export do formátu PHP'),
|
||||
'de' => array('' => 'Export im PHP-Format'),
|
||||
'pl' => array('' => 'Zrzucaj do formatu PHP'),
|
||||
'ro' => array('' => 'Dump în format PHP'),
|
||||
'ja' => array('' => 'PHP 形式でエクスポート'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpXml {
|
||||
class AdminerDumpXml extends Adminer\Plugin {
|
||||
protected $database = false;
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -51,4 +51,12 @@ class AdminerDumpXml {
|
||||
echo "</database>\n";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Export do formátu XML ve struktuře <database name=""><table name=""><column name="">value'),
|
||||
'de' => array('' => 'Export im XML-Format in der Struktur <database name="><table name=""><column name="">value'),
|
||||
'pl' => array('' => 'Zrzut do formatu XML w strukturze <database name=""><table name=""><column name="">value'),
|
||||
'ro' => array('' => 'Dump în format XML în structura <database name=""><table name=""><column name="">value'),
|
||||
'ja' => array('' => '構造化 XML 形式でエクスポート <database name=""><table name=""><column name="">value'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerDumpZip {
|
||||
class AdminerDumpZip extends Adminer\Plugin {
|
||||
protected $filename, $data;
|
||||
|
||||
function dumpOutput() {
|
||||
@@ -40,4 +40,12 @@ class AdminerDumpZip {
|
||||
ob_start(array($this, '_zip'));
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Export do formátu ZIP'),
|
||||
'de' => array('' => 'Export Im ZIP-Format'),
|
||||
'pl' => array('' => 'Zrzuć do formatu ZIP'),
|
||||
'ro' => array('' => 'Dump în format ZIP'),
|
||||
'ja' => array('' => 'ZIP 形式でエクスポート'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEditCalendar {
|
||||
class AdminerEditCalendar extends Adminer\Plugin {
|
||||
protected $prepend, $langPath;
|
||||
|
||||
/**
|
||||
@@ -50,4 +50,12 @@ class AdminerEditCalendar {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zobrazí jQuery UI Timepicker pro každé datumové a časové políčko'),
|
||||
'de' => array('' => 'Zeigen Sie die jQuery-UI Timepicker für jedes Datums- und Datum/Uhrzeit-Feld an'),
|
||||
'pl' => array('' => 'Wyświetl interfejs jQuery Timepicker dla każdego pola daty i godziny'),
|
||||
'ro' => array('' => 'Afișați jQuery UI Timepicker pentru fiecare câmp de dată și dată-timp'),
|
||||
'ja' => array('' => '各日時列に jQuery UI の Timepicker を表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEditForeign {
|
||||
class AdminerEditForeign extends Adminer\Plugin {
|
||||
protected $limit;
|
||||
|
||||
function __construct($limit = 0) {
|
||||
@@ -39,4 +39,12 @@ class AdminerEditForeign {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Výběr cizího klíče v editačním formuláři'),
|
||||
'de' => array('' => 'Wählen Sie im Bearbeitungsformular den Fremdschlüssel aus'),
|
||||
'pl' => array('' => 'Wybierz klucz obcy w formularzu edycji'),
|
||||
'ro' => array('' => 'Selectați cheia străină în formularul de editare'),
|
||||
'ja' => array('' => '外部キーを編集フォームで選択'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,11 +6,19 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEditTextarea {
|
||||
class AdminerEditTextarea extends Adminer\Plugin {
|
||||
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
if (preg_match('~char~', $field["type"])) {
|
||||
return "<textarea cols='30' rows='1'$attrs>" . Adminer\h($value) . '</textarea>';
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Použije <textarea> pro char a varchar'),
|
||||
'de' => array('' => 'Verwenden Sie <textarea> für char und varchar Felder'),
|
||||
'pl' => array('' => 'Użyj <textarea> dla char i varchar'),
|
||||
'ro' => array('' => 'Utilizați <textarea> pentru char și varchar'),
|
||||
'ja' => array('' => 'char や varchar に <textarea> を使用'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEditorSetup {
|
||||
class AdminerEditorSetup extends Adminer\Plugin {
|
||||
private $driver;
|
||||
private $server;
|
||||
private $database;
|
||||
@@ -37,4 +37,11 @@ class AdminerEditorSetup {
|
||||
return $this->database;
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Nastavit ovladač, server a databázi pro použití s Adminer Editorem'),
|
||||
'de' => array('' => 'Treiber, Server und Datenbank für die Verwendung mit Adminer Editor einrichten'),
|
||||
'ja' => array('' => 'Adminer Editor で使用するドライバ、サーバ、データベースを設定'),
|
||||
'pl' => array('' => 'Konfiguruj sterownik, serwer i bazę danych do użycia z Adminer Editorem'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,17 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEditorViews {
|
||||
class AdminerEditorViews extends Adminer\Plugin {
|
||||
|
||||
function tableName($tableStatus) {
|
||||
return Adminer\h($tableStatus["Comment"] != "" ? $tableStatus["Comment"] : $tableStatus["Name"]);
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zobrazení pohledů v Adminer Editoru'),
|
||||
'de' => array('' => 'Views im Adminer Editor anzeigen'),
|
||||
'pl' => array('' => 'Wyświetlaj widoki w Adminer Editorze'),
|
||||
'ro' => array('' => 'Afișează vizualizări în Adminer Editor'),
|
||||
'ja' => array('' => 'Adminer Editor にビューを表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEmailTable {
|
||||
class AdminerEmailTable extends Adminer\Plugin {
|
||||
protected $table, $id, $title, $subject, $message;
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ class AdminerEmailTable {
|
||||
* @param string $subject quoted column name
|
||||
* @param string $message quoted column name
|
||||
*/
|
||||
function __construct(string $table = "email", string $id = "id", string $title = "subject", string $subject = "subject", string $message = "message") {
|
||||
function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
|
||||
$this->table = $table;
|
||||
$this->id = $id;
|
||||
$this->title = $title;
|
||||
@@ -54,4 +54,12 @@ class AdminerEmailTable {
|
||||
$_POST["email_message"] = $row[1];
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Získá předmět a zprávu e-mailu z databáze (Adminer Editor)'),
|
||||
'de' => array('' => 'E-Mail-Betreff und Nachricht aus der Datenbank abrufen (Adminer Editor)'),
|
||||
'pl' => array('' => 'Pobieraj temat i wiadomość e-mail z bazy danych (Adminer Editor)'),
|
||||
'ro' => array('' => 'Obțineți subiectul e-mailului și mesajul din baza de date (Adminer Editor)'),
|
||||
'ja' => array('' => 'メールの件名と本文をデータベースから取得 (Adminer Editor)'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerEnumOption {
|
||||
class AdminerEnumOption extends Adminer\Plugin {
|
||||
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
if ($field["type"] == "enum") {
|
||||
@@ -32,4 +32,12 @@ class AdminerEnumOption {
|
||||
return "<select$attrs>" . Adminer\optionlist($options, $selected, 1) . "</select>"; // 1 - use keys
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Editace políčka enum pomocí <select><option> místo <input type="radio">'),
|
||||
'de' => array('' => 'Verwenden Sie <select><option> für die enum-Bearbeitung anstelle von <input type="radio">'),
|
||||
'pl' => array('' => 'Użyj <select><option> do edycji enum zamiast <input type="radio">'),
|
||||
'ro' => array('' => 'Utilizați <select><option> pentru editarea enum în loc de <input type="radio">'),
|
||||
'ja' => array('' => '列挙型の編集に <input type="radio"> ではなく <select><option> を使用'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerFileUpload {
|
||||
class AdminerFileUpload extends Adminer\Plugin {
|
||||
protected $uploadPath, $displayPath, $extensions;
|
||||
|
||||
/**
|
||||
@@ -48,4 +48,12 @@ class AdminerFileUpload {
|
||||
$link = "$this->displayPath$_GET[select]/$regs[1]-$val";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Políčka končící na "_path" upravuje pomocí <input type="file"> a odkazuje na nahrané soubory z výpisu'),
|
||||
'de' => array('' => 'Bearbeiten Sie Felder, die mit "_path" enden, um <input type="file"> und verknüpfen Sie sie mit den hochgeladenen Dateien beim Select'),
|
||||
'pl' => array('' => 'Edytuj pola kończące się na "_path" za pomocą <input type="file"> i link do przesłanych plików z wybierz'),
|
||||
'ro' => array('' => 'Modificați câmpurile care se termină cu "_path" prin <input type="file"> și creați un link către fișierele încărcate din select'),
|
||||
'ja' => array('' => '列名が "_path" で終わる列を <input type="file"> で変更し、"選択" からアップロードされたファイルにリンク'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/** Link system tables (in mysql and information_schema databases) by foreign keys
|
||||
/** Link system tables (in "mysql" and "information_schema" databases) by foreign keys
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerForeignSystem {
|
||||
class AdminerForeignSystem extends Adminer\Plugin {
|
||||
|
||||
function foreignKeys($table) {
|
||||
if (Adminer\DRIVER == "server" && Adminer\DB == "mysql") {
|
||||
@@ -105,4 +105,12 @@ class AdminerForeignSystem {
|
||||
private function collations($source) {
|
||||
return array("table" => "COLLATIONS", "source" => array($source), "target" => array("COLLATION_NAME"));
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Propojuje systémové tabulky (v databázích "mysql" a "information_schema") pomocí cizích klíčů'),
|
||||
'de' => array('' => 'Verknüpfen Sie Systemtabellen (in "mysql"- und "information_schema"-Datenbanken) durch Fremdschlüssel'),
|
||||
'pl' => array('' => 'Połącz tabele systemowe (w bazach danych "mysql" i "information_schema") za pomocą kluczy obcych'),
|
||||
'ro' => array('' => 'Conectați tabelele de sistem (în bazele de date "mysql" și "information_schema") prin chei străine'),
|
||||
'ja' => array('' => 'システムテーブル ("mysql" と "information_schema") を外部キーを用いて接続'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
/** Allow using Adminer inside a frame (disables ClickJacking protection)
|
||||
/** Allow using Adminer inside a frame
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerFrames {
|
||||
class AdminerFrames extends Adminer\Plugin {
|
||||
protected $sameOrigin;
|
||||
|
||||
/**
|
||||
* @param bool $sameOrigin allow running from the same origin only
|
||||
*/
|
||||
function __construct(bool $sameOrigin = false) {
|
||||
function __construct($sameOrigin = false) {
|
||||
$this->sameOrigin = $sameOrigin;
|
||||
}
|
||||
|
||||
@@ -23,4 +23,12 @@ class AdminerFrames {
|
||||
header_remove("X-Frame-Options");
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Dovolí pracovat Admineru uvnitř rámu'),
|
||||
'de' => array('' => 'Erlauben Sie die Verwendung von Adminer innerhalb eines Frames'),
|
||||
'pl' => array('' => 'Zezwalaj na używanie Adminera wewnątrz ramki'),
|
||||
'ro' => array('' => 'Permiteți utilizarea Adminer în interiorul unui cadru'),
|
||||
'ja' => array('' => 'フレーム内での Adminer 利用を許可'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerJsonColumn {
|
||||
class AdminerJsonColumn extends Adminer\Plugin {
|
||||
private function testJson($value) {
|
||||
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
||||
return $json;
|
||||
@@ -45,4 +45,12 @@ class AdminerJsonColumn {
|
||||
$this->buildTable($json);
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Hodnoty JSON v editaci zobrazí formou tabulky'),
|
||||
'de' => array('' => 'Zeigen Sie JSON-Werte als Tabelle in der Bearbeitung an'),
|
||||
'pl' => array('' => 'Wyświetl wartości JSON jako tabelę w edycji'),
|
||||
'ro' => array('' => 'Afișează valorile JSON sub formă de tabel în editare'),
|
||||
'ja' => array('' => 'JSON 値をテーブルとして編集画面に表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginIp {
|
||||
class AdminerLoginIp extends Adminer\Plugin {
|
||||
protected $ips, $forwarded_for;
|
||||
|
||||
/** Set allowed IP addresses
|
||||
@@ -35,4 +35,12 @@ class AdminerLoginIp {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zkontroluje IP adresu a povolí prázdné heslo'),
|
||||
'de' => array('' => 'Überprüft die IP-Adresse und lässt ein leeres Passwort zu'),
|
||||
'pl' => array('' => 'Sprawdzaj adres IP i zezwakaj na puste hasło'),
|
||||
'ro' => array('' => 'Verificați adresa IP și permiteți parola goală'),
|
||||
'ja' => array('' => 'IP アドレスの確認、及び空パスワードの許可'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginOtp {
|
||||
class AdminerLoginOtp extends Adminer\Plugin {
|
||||
protected $secret;
|
||||
|
||||
/**
|
||||
@@ -50,4 +50,16 @@ class AdminerLoginOtp {
|
||||
$unpacked = unpack('N', substr($hash, $offset, 4));
|
||||
return ($unpacked[1] & 0x7FFFFFFF) % 1e6;
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/login-otp.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Při přihlášení požaduje jednorázové heslo'),
|
||||
'de' => array('' => 'Bei der Anmeldung ist ein Einmalpasswort (Zwei-Faktor-Authentifizierung) erforderlich'),
|
||||
'pl' => array('' => 'Wymagaj jednorazowego hasła przy logowaniu'),
|
||||
'ro' => array('' => 'Cereți o parolă unică la autentificare'),
|
||||
'ja' => array('' => 'ログイン時にワンタイムパスワード (二要素認証) が必要'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/** Enable login for password-less database
|
||||
/** Enable login without password
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginPasswordLess {
|
||||
class AdminerLoginPasswordLess extends Adminer\Plugin {
|
||||
protected $password_hash;
|
||||
|
||||
/** Set allowed password
|
||||
@@ -26,4 +26,12 @@ class AdminerLoginPasswordLess {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Povolí přihlášení bez hesla'),
|
||||
'de' => array('' => 'Ermöglicht die Anmeldung ohne Passwort'),
|
||||
'pl' => array('' => 'Włącz logowanie bez hasła'),
|
||||
'ro' => array('' => 'Activați autentificarea fără parolă'),
|
||||
'ja' => array('' => 'パスワードなしのログインを許可'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginServers {
|
||||
class AdminerLoginServers extends Adminer\Plugin {
|
||||
protected $servers;
|
||||
|
||||
/** Set supported servers
|
||||
@@ -37,4 +37,12 @@ class AdminerLoginServers {
|
||||
return $heading . Adminer\html_select("auth[server]", array_keys($this->servers), Adminer\SERVER) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'V přihlašovacím formuláři zobrazuje předdefinovaný seznam serverů'),
|
||||
'de' => array('' => 'Anzeige einer konstanten Serverliste im Anmeldeformular'),
|
||||
'pl' => array('' => 'Wyświetlaj stałą listę serwerów w formularzu logowania'),
|
||||
'ro' => array('' => 'Afișarea unei liste constante de servere în formularul de conectare'),
|
||||
'ja' => array('' => 'ログイン画面に定義済のサーバリストを表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginSsl {
|
||||
class AdminerLoginSsl extends Adminer\Plugin {
|
||||
protected $ssl;
|
||||
|
||||
/**
|
||||
@@ -21,4 +21,12 @@ class AdminerLoginSsl {
|
||||
function connectSsl() {
|
||||
return $this->ssl;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Připojení k MySQL, PostgreSQL a MS SQL pomocí SSL'),
|
||||
'de' => array('' => 'Stellen Sie eine Verbindung zu MySQL, PostgreSQL, MS SQL über SSL her'),
|
||||
'pl' => array('' => 'Połącz się z MySQL, PostgreSQL, MS SQL za pomocą protokołu SSL'),
|
||||
'ro' => array('' => 'Conectați-vă la MySQL, PostgreSQL, MS SQL utilizând SSL'),
|
||||
'ja' => array('' => 'MySQL, PostgreSQL, MS SQL への接続時に SSL を利用'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@ CREATE TABLE login (
|
||||
);
|
||||
*/
|
||||
|
||||
/** Authenticate a user from the login table
|
||||
/** Authenticate a user from the "login" table
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginTable {
|
||||
class AdminerLoginTable extends Adminer\Plugin {
|
||||
protected $database;
|
||||
|
||||
/** Set database of login table */
|
||||
@@ -26,4 +26,12 @@ class AdminerLoginTable {
|
||||
function login($login, $password) {
|
||||
return (bool) Adminer\get_val("SELECT COUNT(*) FROM " . Adminer\idf_escape($this->database) . ".login WHERE login = " . Adminer\q($login) . " AND password_sha1 = " . Adminer\q(sha1($password)));
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Autentizace uživatele podle tabulky "login"'),
|
||||
'de' => array('' => 'Authentifizieren Sie einen Benutzer über die Tabelle "login"'),
|
||||
'pl' => array('' => 'Uwierzytelnij użytkownika z tabeli "login"'),
|
||||
'ro' => array('' => 'Autentificați un utilizator din tabelul "login"'),
|
||||
'ja' => array('' => '"login" テーブルによるユーザ認証'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerMasterSlave {
|
||||
class AdminerMasterSlave extends Adminer\Plugin {
|
||||
private $masters = array();
|
||||
|
||||
/**
|
||||
@@ -37,4 +37,12 @@ class AdminerMasterSlave {
|
||||
$_SESSION["master"] = $result->fetch_assoc();
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zápisy provádět na masteru a čtení na slave'),
|
||||
'de' => array('' => 'Schreibvorgänge auf dem Master und Lesevorgänge auf dem Slave ausführen'),
|
||||
'pl' => array('' => 'Wykonuje zapisy na komputerze głównym i odczyty na komputerze podrzędnym'),
|
||||
'ro' => array('' => 'Executarea scrierilor pe master și a citirilor pe slave'),
|
||||
'ja' => array('' => 'マスタ書込みとスレーブ読込みの有効化'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -67,8 +67,13 @@ class AdminerMenuLinks extends Adminer\Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected static $translations = array(
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/menu-links.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array(
|
||||
'' => 'Konfigurace odkazů na tabulky v menu; kombinovatelné s AdminerConfig',
|
||||
'Menu table links' => 'Odkazy na tabulky v menu',
|
||||
'Both' => 'Oboje',
|
||||
'Auto (select on select page, structure otherwise)' => 'Auto (vypsat na výpisech, jinak struktura)',
|
||||
@@ -78,5 +83,17 @@ class AdminerMenuLinks extends Adminer\Plugin {
|
||||
'Both' => 'Obie',
|
||||
'Auto (select on select page, structure otherwise)' => 'Auto (pokaż na stronie przeglądania, w przeciwnym razie struktura)',
|
||||
),
|
||||
'de' => array(
|
||||
'' => 'Menü- und Tabellen-Links konfigurieren. Kombinierbar mit AdminerConfig',
|
||||
'Both' => 'Beide',
|
||||
'Auto (select on select page, structure otherwise)' => 'Auto (Auswahl auf der ausgewählten Seite, sonst Struktur)',
|
||||
'Menu table links' => 'Links verwenden in „Tabelle“',
|
||||
),
|
||||
'ja' => array(
|
||||
'' => 'メニュー内テーブルへのリンク設定; AdminerConfig との併用可',
|
||||
'Both' => '両方',
|
||||
'Auto (select on select page, structure otherwise)' => '自動 (選択ページでは選択、それ以外では構造)',
|
||||
'Menu table links' => 'メニューテーブルへのリンク',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerMonaco {
|
||||
class AdminerMonaco extends Adminer\Plugin {
|
||||
private $root;
|
||||
|
||||
function __construct($root = "https://cdn.jsdelivr.net/npm/monaco-editor@0.52/min/vs") {
|
||||
@@ -71,4 +71,11 @@ addEventListener('DOMContentLoaded', () => {
|
||||
<?php
|
||||
return true;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Použije Monaco Editor z VS Code pro zvýrazňování syntaxe a <textarea>'),
|
||||
'de' => array('' => 'Monaco-Editor von VS Code verwenden, für die Syntaxhervorhebung und SQL <textarea>'),
|
||||
'ja' => array('' => '構文や <textarea> の強調表示に VS Code の Monaco Editor を使用'),
|
||||
'pl' => array('' => 'Użyj Monaco Editora programu VS Code do podświetlania składni i <textarea> SQL'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
// this file is not used anymore and you don't need to include it; it's kept only for backwards compatibility
|
||||
|
||||
/** Adminer customization allowing usage of plugins
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerPlugin extends Adminer\Plugins {
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerPrettyJsonColumn {
|
||||
class AdminerPrettyJsonColumn extends Adminer\Plugin {
|
||||
private function testJson($value) {
|
||||
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
||||
return $json;
|
||||
@@ -30,4 +30,12 @@ class AdminerPrettyJsonColumn {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'V editaci zobrazí syntaxi u JSONu'),
|
||||
'de' => array('' => 'JSON-Werte in der Bearbeitung hübsch drucken'),
|
||||
'pl' => array('' => 'Ładnie drukuj wartości JSON w edycji'),
|
||||
'ro' => array('' => 'Afisare frumoasa a valorilor JSON în editare'),
|
||||
'ja' => array('' => '編集時に JSON 文字列を見易く表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerPrism {
|
||||
class AdminerPrism extends Adminer\Plugin {
|
||||
private $editorRoot;
|
||||
private $minified;
|
||||
private $theme;
|
||||
@@ -59,4 +59,11 @@ if (el) {
|
||||
<?php
|
||||
return true;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Použije Prism Code Editor pro zvýrazňování syntaxe a <textarea>'),
|
||||
'de' => array('' => 'Prism Code Editor verwenden, für die Syntaxhervorhebung und <textarea>'),
|
||||
'ja' => array('' => '構文や <textarea> の強調表示に Prism Code Editor を使用'),
|
||||
'pl' => array('' => 'Użyj Prism Code Editora do podświetlania składni i <textarea>'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -100,13 +100,13 @@ class AdminerSelectEmail extends Adminer\Plugin {
|
||||
return mail($email, $this->emailHeader($subject), $beginning . $message . $attachments, $headers);
|
||||
}
|
||||
|
||||
protected static $translations = array(
|
||||
protected $translations = array(
|
||||
'ar' => array('E-mail' => 'البريد الإلكتروني', 'From' => 'من', 'Subject' => 'الموضوع', 'Send' => 'إرسال', '%d e-mail(s) have been sent.' => 'تم إرسال %d رسالة.', 'Attachments' => 'ملفات مرفقة'),
|
||||
'bg' => array('E-mail' => 'E-mail', 'From' => 'От', 'Subject' => 'Тема', 'Attachments' => 'Прикачени', 'Send' => 'Изпращане', '%d e-mail(s) have been sent.' => array('%d писмо беше изпратено.', '%d писма бяха изпратени.')),
|
||||
'bn' => array('E-mail' => 'ই-মেইল', 'From' => 'থেকে', 'Subject' => 'বিষয়', 'Send' => 'পাঠান', '%d e-mail(s) have been sent.' => array('%d ইমেইল(গুলি) পাঠানো হয়েছে।', '%d ইমেইল(গুলি) পাঠানো হয়েছে।'), 'Attachments' => 'সংযুক্তিগুলো'),
|
||||
'bs' => array('E-mail' => 'El. pošta', 'From' => 'Od', 'Subject' => 'Naslov', 'Attachments' => 'Prilozi', 'Send' => 'Pošalji', '%d e-mail(s) have been sent.' => array('%d poruka el. pošte je poslata.', '%d poruke el. pošte su poslate.', '%d poruka el. pošte je poslato.')),
|
||||
'ca' => array('E-mail' => 'Correu electrònic', 'From' => 'De', 'Subject' => 'Assumpte', 'Send' => 'Envia', '%d e-mail(s) have been sent.' => array('S\'ha enviat %d correu electrònic.', 'S\'han enviat %d correus electrònics.'), 'Attachments' => 'Adjuncions'),
|
||||
'cs' => array('E-mail' => 'E-mail', 'From' => 'Odesílatel', 'Subject' => 'Předmět', 'Attachments' => 'Přílohy', 'Send' => 'Odeslat', '%d e-mail(s) have been sent.' => array('Byl odeslán %d e-mail.', 'Byly odeslány %d e-maily.', 'Bylo odesláno %d e-mailů.')),
|
||||
'cs' => array('' => 'Umožňuje posílat e-maily na adresy v tabulce', 'E-mail' => 'E-mail', 'From' => 'Odesílatel', 'Subject' => 'Předmět', 'Attachments' => 'Přílohy', 'Send' => 'Odeslat', '%d e-mail(s) have been sent.' => array('Byl odeslán %d e-mail.', 'Byly odeslány %d e-maily.', 'Bylo odesláno %d e-mailů.')),
|
||||
'da' => array('E-mail' => 'E-mail', 'From' => 'Fra', 'Subject' => 'Titel', 'Attachments' => 'Vedhæft', 'Send' => 'Send', '%d e-mail(s) have been sent.' => array('%d email sendt.', '%d emails sendt.')),
|
||||
'de' => array('E-mail' => 'E-Mail', 'From' => 'Von', 'Subject' => 'Betreff', 'Send' => 'Abschicken', '%d e-mail(s) have been sent.' => array('%d E-Mail abgeschickt.', '%d E-Mails abgeschickt.'), 'Attachments' => 'Anhänge'),
|
||||
'el' => array('E-mail' => 'E-mail', 'From' => 'Από', 'Subject' => 'Θέμα', 'Attachments' => 'Συνημμένα', 'Send' => 'Αποστολή', '%d e-mail(s) have been sent.' => array('%d e-mail απεστάλη.', '%d e-mail απεστάλησαν.')),
|
||||
@@ -121,7 +121,7 @@ class AdminerSelectEmail extends Adminer\Plugin {
|
||||
'hu' => array('E-mail' => 'E-mail', 'From' => 'Feladó', 'Subject' => 'Tárgy', 'Send' => 'Küldés', '%d e-mail(s) have been sent.' => array('%d e-mail elküldve.', '%d e-mail elküldve.', '%d e-mail elküldve.'), 'Attachments' => 'Csatolmány'),
|
||||
'id' => array('E-mail' => 'Surel', 'From' => 'Dari', 'Subject' => 'Judul', 'Attachments' => 'Lampiran', 'Send' => 'Kirim', '%d e-mail(s) have been sent.' => '%d surel berhasil dikirim.'),
|
||||
'it' => array('E-mail' => 'E-mail', 'From' => 'Da', 'Subject' => 'Oggetto', 'Send' => 'Invia', '%d e-mail(s) have been sent.' => array('%d e-mail inviata.', '%d e-mail inviate.'), 'Attachments' => 'Allegati'),
|
||||
'ja' => array('E-mail' => 'メール', 'From' => '差出人', 'Subject' => '題名', 'Send' => '送信', '%d e-mail(s) have been sent.' => '%d メールを送信しました。', 'Attachments' => '添付ファイル'),
|
||||
'ja' => array('' => 'テーブルに含まれるアドレスにメールを送信', 'E-mail' => 'メール', 'From' => '差出人', 'Subject' => '題名', 'Send' => '送信', '%d e-mail(s) have been sent.' => '%d メールを送信しました。', 'Attachments' => '添付ファイル'),
|
||||
'ka' => array('E-mail' => 'ელ. ფოსტა', 'From' => 'ავტორი:', 'Subject' => 'თემა', 'Send' => 'გაგზავნა', '%d e-mail(s) have been sent.' => 'გაიგზავნა %d წერილი.', 'Attachments' => 'მიმაგრებული ფაილები'),
|
||||
'ko' => array('%d e-mail(s) have been sent.' => '%d개 메일을 보냈습니다.', 'Attachments' => '첨부 파일', 'E-mail' => '메일', 'From' => '보낸 사람', 'Send' => '보내기', 'Subject' => '제목'),
|
||||
'lt' => array('E-mail' => 'El. paštas', 'From' => 'Nuo', 'Subject' => 'Antraštė', 'Attachments' => 'Priedai', 'Send' => 'Siųsti', '%d e-mail(s) have been sent.' => array('Išsiųstas %d laiškas.', 'Išsiųsti %d laiškai.', 'Išsiųsta %d laiškų.')),
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerSlugify {
|
||||
class AdminerSlugify extends Adminer\Plugin {
|
||||
protected $from, $to;
|
||||
|
||||
/**
|
||||
* @param string $from find these characters ...
|
||||
* @param string $to ... and replace them by these
|
||||
*/
|
||||
function __construct(string $from = 'áčďéěíňóřšťúůýž', string $to = 'acdeeinorstuuyz') {
|
||||
function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
|
||||
$this->from = $from;
|
||||
$this->to = $to;
|
||||
}
|
||||
@@ -46,4 +46,12 @@ class AdminerSlugify {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Předvyplní políčko obsahující "_slug" URLizovanou hodnotou předchozího políčka (JavaScript)'),
|
||||
'de' => array('' => 'Feld, das "_slug" enthält, mit dem Slugified-Wert eines vorherigen Felds vorab füllen (JavaScript)'),
|
||||
'pl' => array('' => 'Wstępnie wypełnij pole zawierające "_slug" osłabioną wartością poprzedniego pola (JavaScript)'),
|
||||
'ro' => array('' => 'Precompletați câmpul care conține "_slug" cu valoarea slugificată a unui câmp anterior (JavaScript)'),
|
||||
'ja' => array('' => '列名に "_slug" を含む列を、前列の URL 化された値でプレフィル (JavaScript)'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/** AI prompt in SQL command generating the queries with Google Gemini
|
||||
* Beware that this sends your whole database structure (not data) to Google Gemini.
|
||||
* @link https://www.adminer.org/static/plugins/sql-gemini.gif
|
||||
* @link https://gemini.google.com/
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
@@ -17,7 +16,7 @@ class AdminerSqlGemini extends Adminer\Plugin {
|
||||
* @param string $apiKey The default key is shared with all users and may run out of quota; get your own API key at: https://aistudio.google.com/apikey
|
||||
* @param string $model Available models: https://ai.google.dev/gemini-api/docs/models#available-models
|
||||
*/
|
||||
function __construct(string $apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', string $model = "gemini-2.0-flash") {
|
||||
function __construct($apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', $model = "gemini-2.0-flash") {
|
||||
$this->apiKey = $apiKey;
|
||||
$this->model = $model;
|
||||
}
|
||||
@@ -33,7 +32,7 @@ class AdminerSqlGemini extends Adminer\Plugin {
|
||||
//~ echo $prompt; exit;
|
||||
$context = stream_context_create(array("http" => array(
|
||||
"method" => "POST",
|
||||
"header" => array("User-Agent: AdminerSqlGemini", "Content-Type: application/json"),
|
||||
"header" => array("User-Agent: AdminerSqlGemini/" . Adminer\VERSION, "Content-Type: application/json"),
|
||||
"content" => '{"contents": [{"parts":[{"text": ' . json_encode($prompt) . '}]}]}',
|
||||
"ignore_errors" => true,
|
||||
)));
|
||||
@@ -92,9 +91,14 @@ geminiText.onkeydown = event => {
|
||||
<?php
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/sql-gemini.gif";
|
||||
}
|
||||
|
||||
// use the phrases from https://gemini.google.com/
|
||||
protected static $translations = array(
|
||||
protected $translations = array(
|
||||
'cs' => array(
|
||||
'' => 'Generování SQL příkazů pomocí umělé inteligence Google Gemini',
|
||||
'Ask Gemini' => 'Zeptat se Gemini',
|
||||
'Just a sec...' => 'Chviličku...',
|
||||
),
|
||||
@@ -102,5 +106,15 @@ geminiText.onkeydown = event => {
|
||||
'Ask Gemini' => 'Zapytaj Gemini',
|
||||
'Just a sec...' => 'Chwileczkę...',
|
||||
),
|
||||
'de' => array(
|
||||
'' => 'KI-Eingabeaufforderung im SQL-Befehl zur Erstellung der Abfragen mit Google Gemini',
|
||||
'Ask Gemini' => 'Gemini fragen',
|
||||
'Just a sec...' => 'Einen Moment...',
|
||||
),
|
||||
'ja' => array(
|
||||
'' => 'Google Gemini AI を用いて SQL 文を生成',
|
||||
'Ask Gemini' => 'Gemini に聞く',
|
||||
'Just a sec...' => 'しばらくお待ち下さい...',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerSqlLog {
|
||||
class AdminerSqlLog extends Adminer\Plugin {
|
||||
protected $filename;
|
||||
|
||||
/**
|
||||
* @param string $filename defaults to "$database.sql"
|
||||
*/
|
||||
function __construct(string $filename = "") {
|
||||
function __construct($filename = "") {
|
||||
$this->filename = $filename;
|
||||
}
|
||||
|
||||
@@ -35,4 +35,12 @@ class AdminerSqlLog {
|
||||
flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zaznamenává všechny příkazy do souboru SQL'),
|
||||
'de' => array('' => 'Protokollieren Sie alle Abfragen in einer SQL-Datei'),
|
||||
'pl' => array('' => 'Rejestruj wszystkie zapytania do pliku SQL'),
|
||||
'ro' => array('' => 'Logați toate interogările în fișierul SQL'),
|
||||
'ja' => array('' => '全クエリを SQL ファイルに記録'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerTableIndexesStructure {
|
||||
class AdminerTableIndexesStructure extends Adminer\Plugin {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param Index[] $indexes data about all indexes on a table
|
||||
*/
|
||||
function tableIndexesPrint(array $indexes): bool {
|
||||
function tableIndexesPrint($indexes): bool {
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . Adminer\lang('Name') . "<th>" . Adminer\lang('Type') . "<th>" . Adminer\lang('Columns') . "</thead>\n";
|
||||
foreach ($indexes as $name => $index) {
|
||||
@@ -29,4 +29,12 @@ class AdminerTableIndexesStructure {
|
||||
echo "</table>\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Rozšířené informace o indexech'),
|
||||
'de' => array('' => 'Erweiterte Ausgabe der Tabellenindize'),
|
||||
'pl' => array('' => 'Rozszerzona tabela wyników struktury indeksów'),
|
||||
'ro' => array('' => 'Ieșirea expandată a structurii indecsilor tabelului'),
|
||||
'ja' => array('' => 'テーブルのインデックス構造を拡張表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerTableStructure {
|
||||
class AdminerTableStructure extends Adminer\Plugin {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param Field[] $fields data about individual fields
|
||||
@@ -37,4 +37,12 @@ class AdminerTableStructure {
|
||||
echo "</div>\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Rozšířené informace o tabulkách'),
|
||||
'de' => array('' => 'Erweiterte Ausgabe der Tabellenstruktur'),
|
||||
'pl' => array('' => 'Rozszerzone wyjście struktury tabeli'),
|
||||
'ro' => array('' => 'Ieșirea expandată a structurii tabelei'),
|
||||
'ja' => array('' => 'テーブル構造を拡張表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/** Use filter in tables list
|
||||
/** Filter names in tables list
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerTablesFilter {
|
||||
class AdminerTablesFilter extends Adminer\Plugin {
|
||||
function tablesPrint($tables) {
|
||||
?>
|
||||
<script<?php echo Adminer\nonce(); ?>>
|
||||
@@ -67,4 +67,12 @@ sessionStorage && document.addEventListener('DOMContentLoaded', () => {
|
||||
<p class="jsonly"><input id="filter-field" autocomplete="off" type="search"><?php echo Adminer\script("qs('#filter-field').oninput = tablesFilterInput;"); ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Filtruje názvy v seznamu tabulek'),
|
||||
'de' => array('' => 'Filtern Sie Namen in der Tabellenliste'),
|
||||
'pl' => array('' => 'Filtruj nazwy na liście tabel'),
|
||||
'ro' => array('' => 'Nume de filtre în lista de tabele'),
|
||||
'ja' => array('' => 'テーブル一覧をテーブル名でフィルタリング'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerTinymce {
|
||||
class AdminerTinymce extends Adminer\Plugin {
|
||||
protected $path;
|
||||
|
||||
function __construct(string $path = "tiny_mce/tiny_mce.js") {
|
||||
function __construct($path = "tiny_mce/tiny_mce.js") {
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
@@ -66,4 +66,12 @@ qs('#form').onsubmit = () => {
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Upravuje všechna políčka obsahující "_html" pomocí HTML editoru TinyMCE a zobrazuje výsledné HTML ve výpisu'),
|
||||
'de' => array('' => 'Bearbeiten Sie alle Felder, die "_html" enthalten, mit dem HTML-Editor TinyMCE und zeigen Sie den HTML-Code in Select an'),
|
||||
'pl' => array('' => 'Edytuj wszystkie pola zawierające "_html" za pomocą edytora HTML TinyMCE i wyświetl kod HTML w wybranych'),
|
||||
'ro' => array('' => 'Editați toate câmpurile care conțin "_html" cu ajutorul editorului HTML TinyMCE și afișați HTML-ul în select'),
|
||||
'ja' => array('' => '列名が "_html" を含む列を TinyMCE の HTML エディタで編集し、編集結果の HTML コードを "選択" 画面に表示'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@ CREATE TABLE translation (
|
||||
);
|
||||
*/
|
||||
|
||||
/** Translate all table and field comments, enum and set values in Editor from the translation table (inserts new translations)
|
||||
/** Translate all table and field comments, enum and set values from the translation table (inserts new translations)
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerTranslation {
|
||||
class AdminerTranslation extends Adminer\Plugin {
|
||||
|
||||
private function translate($idf) {
|
||||
static $translations, $lang;
|
||||
@@ -50,4 +50,12 @@ class AdminerTranslation {
|
||||
$val = $this->translate($val);
|
||||
}
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Přeloží všechny komentáře tabulek a sloupců, hodnoty políček enum a set pomocí tabulky "translation" (automaticky vkládá nové překlady)'),
|
||||
'de' => array('' => 'Übersetzen Sie alle Tabellen- und Feldkommentare, enum- und set-Werte aus der "translation"-Tabelle (fügt automatisch neue Übersetzungen ein)'),
|
||||
'pl' => array('' => 'Przetłumacz wszystkie komentarze do tabeli i pól, wartości enum i set z tabeli "translation" (automatycznie wstawia nowe tłumaczenia)'),
|
||||
'ro' => array('' => 'Traduceți toate comentariile tabelelor și câmpurilor, valorile enum și set din tabelul "translation" (inserează automat noi traduceri)'),
|
||||
'ja' => array('' => 'テーブル "translation" を用いてすべてのテーブルや列のコメント、列挙型、セット値を翻訳 (自動的に翻訳文で更新)'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerVersionGithub {
|
||||
class AdminerVersionGithub extends Adminer\Plugin {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -29,4 +29,11 @@ verifyVersion = (current, url, token) => {
|
||||
function csp(&$csp) {
|
||||
$csp[0]["connect-src"] .= " https://api.github.com/repos/vrana/adminer/releases/latest";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Kontrola nových verzí z GitHubu'),
|
||||
'de' => array('' => 'Neue Versionen von GitHub verifizieren'),
|
||||
'ja' => array('' => 'GitHub の新版を管理'),
|
||||
'pl' => array('' => 'Weryfikuj nowe wersje z GitHuba'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,17 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerVersionNoverify {
|
||||
class AdminerVersionNoverify extends Adminer\Plugin {
|
||||
|
||||
function head($dark = null) {
|
||||
echo Adminer\script("verifyVersion = () => { };");
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zakáže kontrolu nových verzí'),
|
||||
'de' => array('' => 'Deaktivieren Sie die Versionsprüfung'),
|
||||
'pl' => array('' => 'Wyłącz sprawdzanie wersji'),
|
||||
'ro' => array('' => 'Dezactivați verificatorul de versiuni'),
|
||||
'ja' => array('' => 'バージョンチェックを無効化'),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user