mirror of
https://github.com/vrana/adminer.git
synced 2025-09-03 19:32:36 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5dab5ae23e |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,9 +1,6 @@
|
||||
[submodule "jush"]
|
||||
path = externals/jush
|
||||
url = https://github.com/vrana/jush
|
||||
[submodule "JsShrink"]
|
||||
path = externals/JsShrink
|
||||
url = https://github.com/vrana/JsShrink
|
||||
[submodule "PhpShrink"]
|
||||
path = externals/PhpShrink
|
||||
url = https://github.com/vrana/PhpShrink
|
||||
|
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,15 +1,8 @@
|
||||
## Adminer 5.2.1 (released 2025-04-11)
|
||||
- Fix search anywhere (bug #1004, regression from 5.1.1)
|
||||
- Fix import without primary key (bug #1017, regression from 5.1.1)
|
||||
- PostgreSQL PDO: Fix bytea without primary key (bug #1021)
|
||||
- non-MySQL: Parse '--' without trailing space as comment in SQL command (bug #1025, regression from 5.2.0)
|
||||
|
||||
## Adminer 5.2.0 (released 2025-04-08)
|
||||
## Adminer dev
|
||||
- Autocomplete SQL commands
|
||||
- Do not edit NULL values by Modify (bug #967)
|
||||
- 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)
|
||||
- MySQL: Display number of found rows in group queries (regression from 5.1.1)
|
||||
- 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
|
||||
|
@@ -11,7 +11,6 @@ add_driver("mssql", "MS SQL");
|
||||
|
||||
if (isset($_GET["mssql"])) {
|
||||
define('Adminer\DRIVER', "mssql");
|
||||
|
||||
if (extension_loaded("sqlsrv") && $_GET["ext"] != "pdo") {
|
||||
class Db extends SqlDb {
|
||||
public $extension = "sqlsrv";
|
||||
|
@@ -5,7 +5,6 @@ SqlDriver::$drivers = array("server" => "MySQL / MariaDB") + SqlDriver::$drivers
|
||||
|
||||
if (!defined('Adminer\DRIVER')) {
|
||||
define('Adminer\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") && $_GET["ext"] != "pdo") {
|
||||
class Db extends \MySQLi {
|
||||
@@ -557,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
|
||||
|
@@ -5,7 +5,6 @@ add_driver("oracle", "Oracle (beta)");
|
||||
|
||||
if (isset($_GET["oracle"])) {
|
||||
define('Adminer\DRIVER', "oracle");
|
||||
|
||||
if (extension_loaded("oci8") && $_GET["ext"] != "pdo") {
|
||||
class Db extends SqlDb {
|
||||
public $extension = "oci8";
|
||||
|
@@ -5,7 +5,6 @@ add_driver("pgsql", "PostgreSQL");
|
||||
|
||||
if (isset($_GET["pgsql"])) {
|
||||
define('Adminer\DRIVER', "pgsql");
|
||||
|
||||
if (extension_loaded("pgsql") && $_GET["ext"] != "pdo") {
|
||||
class PgsqlDb extends SqlDb {
|
||||
public $extension = "PgSQL";
|
||||
@@ -95,9 +94,8 @@ if (isset($_GET["pgsql"])) {
|
||||
*/
|
||||
function copyFrom(string $table, array $rows): bool {
|
||||
$this->error = '';
|
||||
set_error_handler(function (int $errno, string $error): bool {
|
||||
set_error_handler(function ($errno, $error) {
|
||||
$this->error = (ini_bool('html_errors') ? html_entity_decode($error) : $error);
|
||||
return true;
|
||||
});
|
||||
$return = pg_copy_from($this->link, $table, $rows);
|
||||
restore_error_handler();
|
||||
@@ -529,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;
|
||||
}
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ add_driver("sqlite", "SQLite");
|
||||
|
||||
if (isset($_GET["sqlite"])) {
|
||||
define('Adminer\DRIVER', "sqlite");
|
||||
|
||||
if (class_exists("SQLite3") && $_GET["ext"] != "pdo") {
|
||||
|
||||
abstract class SqliteDb extends SqlDb {
|
||||
public $extension = "SQLite3";
|
||||
private $link;
|
||||
|
@@ -11,7 +11,7 @@ if (substr(VERSION, -4) != '-dev') {
|
||||
header("Cache-Control: immutable");
|
||||
}
|
||||
|
||||
@ini_set("zlib.output_compression", '1'); // @ - may be disabled
|
||||
@ini_set("zlib.output_compression", 1); // @ - may be disabled
|
||||
|
||||
if ($_GET["file"] == "default.css") {
|
||||
header("Content-Type: text/css; charset=utf-8");
|
||||
|
@@ -31,7 +31,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
||||
$result
|
||||
);
|
||||
if (!$row["drop"]) {
|
||||
$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
|
||||
$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
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,10 +60,6 @@ class Adminer {
|
||||
return get_databases($flush);
|
||||
}
|
||||
|
||||
/** Print links after list of plugins */
|
||||
function pluginsLinks(): void {
|
||||
}
|
||||
|
||||
/** Operators used in select
|
||||
* @return list<string> operators
|
||||
*/
|
||||
@@ -538,39 +534,41 @@ class Adminer {
|
||||
}
|
||||
}
|
||||
foreach ((array) $_GET["where"] as $key => $val) {
|
||||
$col = $val["col"];
|
||||
if ("$col$val[val]" != "" && in_array($val["op"], adminer()->operators())) {
|
||||
$conds = array();
|
||||
foreach (($col != "" ? array($col => $fields[$col]) : $fields) as $name => $field) {
|
||||
$prefix = "";
|
||||
$cond = " $val[op]";
|
||||
if (preg_match('~IN$~', $val["op"])) {
|
||||
$in = process_length($val["val"]);
|
||||
$cond .= " " . ($in != "" ? $in : "(NULL)");
|
||||
} elseif ($val["op"] == "SQL") {
|
||||
$cond = " $val[val]"; // SQL injection
|
||||
} elseif (preg_match('~^(I?LIKE) %%$~', $val["op"], $match)) {
|
||||
$cond = " $match[1] " . adminer()->processInput($field, "%$val[val]%");
|
||||
} elseif ($val["op"] == "FIND_IN_SET") {
|
||||
$prefix = "$val[op](" . q($val["val"]) . ", ";
|
||||
$cond = ")";
|
||||
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
||||
$cond .= " " . adminer()->processInput($field, $val["val"]);
|
||||
}
|
||||
if ($col != "" || ( // find anywhere
|
||||
isset($field["privileges"]["where"])
|
||||
&& (preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
|
||||
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val["val"]))
|
||||
)) {
|
||||
$conds[] = $prefix . driver()->convertSearch(idf_escape($name), $val, $field) . $cond;
|
||||
}
|
||||
if ("$val[col]$val[val]" != "" && in_array($val["op"], adminer()->operators())) {
|
||||
$prefix = "";
|
||||
$cond = " $val[op]";
|
||||
if (preg_match('~IN$~', $val["op"])) {
|
||||
$in = process_length($val["val"]);
|
||||
$cond .= " " . ($in != "" ? $in : "(NULL)");
|
||||
} elseif ($val["op"] == "SQL") {
|
||||
$cond = " $val[val]"; // SQL injection
|
||||
} elseif ($val["op"] == "LIKE %%") {
|
||||
$cond = " LIKE " . adminer()->processInput(idx($fields, $val["col"], array()), "%$val[val]%"); // this is used by search anywhere which doesn't set $val["col"]
|
||||
} elseif ($val["op"] == "ILIKE %%") {
|
||||
$cond = " ILIKE " . adminer()->processInput($fields[$val["col"]], "%$val[val]%");
|
||||
} elseif ($val["op"] == "FIND_IN_SET") {
|
||||
$prefix = "$val[op](" . q($val["val"]) . ", ";
|
||||
$cond = ")";
|
||||
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
||||
$cond .= " " . adminer()->processInput($fields[$val["col"]], $val["val"]);
|
||||
}
|
||||
if ($val["col"] != "") {
|
||||
$return[] = $prefix . driver()->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
|
||||
} else {
|
||||
// find anywhere
|
||||
$cols = array();
|
||||
foreach ($fields as $name => $field) {
|
||||
if (
|
||||
isset($field["privileges"]["where"])
|
||||
&& (preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
|
||||
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val["val"]))
|
||||
) {
|
||||
$cols[] = $prefix . driver()->convertSearch(idf_escape($name), $val, $field) . $cond;
|
||||
}
|
||||
}
|
||||
$return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0");
|
||||
}
|
||||
$return[] =
|
||||
(count($conds) == 1 ? $conds[0] :
|
||||
($conds ? "(" . implode(" OR ", $conds) . ")" :
|
||||
"1 = 0"
|
||||
));
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
@@ -1024,15 +1022,13 @@ class Adminer {
|
||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||
echo "jushLinks.$val = jushLinks." . JUSH . ";\n";
|
||||
}
|
||||
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"];
|
||||
}
|
||||
$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";
|
||||
}
|
||||
@@ -1076,7 +1072,6 @@ class Adminer {
|
||||
function tablesPrint(array $tables): void {
|
||||
echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
|
||||
foreach ($tables as $table => $status) {
|
||||
$table = "$table"; // do not highlight "0" as active everywhere
|
||||
$name = adminer()->tableName($status);
|
||||
if ($name != "") {
|
||||
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'
|
||||
|
@@ -89,26 +89,14 @@ if (
|
||||
echo script("tableCheck();");
|
||||
}
|
||||
|
||||
if (!empty(adminer()->plugins)) {
|
||||
if (isset(adminer()->plugins) && is_array(adminer()->plugins)) {
|
||||
echo "<div class='plugins'>\n";
|
||||
echo "<h3>" . lang('Loaded plugins') . "</h3>\n<ul>\n";
|
||||
foreach (adminer()->plugins as $plugin) {
|
||||
$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"
|
||||
;
|
||||
$reflection = new \ReflectionObject($plugin);
|
||||
echo "<li><b>" . get_class($plugin) . "</b>" . h(preg_match('~^/[\s*]+(.+)~', $reflection->getDocComment(), $match) ? ": $match[1]" : "") . "\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
adminer()->pluginsLinks();
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
|
@@ -197,7 +197,10 @@ abstract class SqlDriver {
|
||||
* @param Field $field
|
||||
*/
|
||||
function value(?string $val, array $field): ?string {
|
||||
return (method_exists($this->conn, 'value') ? $this->conn->value($val, $field) : $val);
|
||||
return (method_exists($this->conn, 'value')
|
||||
? $this->conn->value($val, $field)
|
||||
: (is_resource($val) ? stream_get_contents($val) : $val)
|
||||
);
|
||||
}
|
||||
|
||||
/** Quote binary string */
|
||||
@@ -254,12 +257,10 @@ AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'", $this->conn); // ignore default IS N
|
||||
*/
|
||||
function allFields(): array {
|
||||
$return = array();
|
||||
foreach (
|
||||
get_rows("SELECT TABLE_NAME AS tab, COLUMN_NAME AS field, IS_NULLABLE AS nullable, DATA_TYPE AS type, CHARACTER_MAXIMUM_LENGTH AS length" . (JUSH == 'sql' ? ", COLUMN_KEY = 'PRI' AS `primary`" : "") . "
|
||||
foreach (get_rows("SELECT TABLE_NAME AS tab, COLUMN_NAME AS field, IS_NULLABLE AS nullable, DATA_TYPE AS type, CHARACTER_MAXIMUM_LENGTH AS length" . (JUSH == 'sql' ? ", COLUMN_KEY = 'PRI' AS `primary`" : "") . "
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = " . q($_GET["ns"] != "" ? $_GET["ns"] : DB) . "
|
||||
ORDER BY TABLE_NAME, ORDINAL_POSITION", $this->conn) as $row
|
||||
) {
|
||||
ORDER BY TABLE_NAME, ORDINAL_POSITION", $this->conn) as $row) {
|
||||
$row["null"] = ($row["nullable"] == "YES");
|
||||
$return[$row["tab"]][] = $row;
|
||||
}
|
||||
|
@@ -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]" : "")
|
||||
;
|
||||
}
|
||||
|
||||
|
@@ -595,10 +595,10 @@ function column_foreign_keys(string $table): array {
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Compute fields() from $_POST edit data; used by Mongo and SimpleDB
|
||||
/** Compute fields() from $_POST edit data
|
||||
* @return Field[] same as fields()
|
||||
*/
|
||||
function fields_from_edit(): array {
|
||||
function fields_from_edit(): array { // used by Mongo and SimpleDB
|
||||
$return = array();
|
||||
foreach ((array) $_POST["field_keys"] as $key => $val) {
|
||||
if ($val != "") {
|
||||
|
@@ -71,20 +71,11 @@ if (extension_loaded('pdo')) {
|
||||
public $_offset = 0, $num_rows;
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->fetch_array(\PDO::FETCH_ASSOC);
|
||||
return $this->fetch(\PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
function fetch_row() {
|
||||
return $this->fetch_array(\PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
private function fetch_array(int $mode) {
|
||||
$return = $this->fetch($mode);
|
||||
return ($return ? array_map(array($this, 'unresource'), $return) : $return);
|
||||
}
|
||||
|
||||
private function unresource($val) {
|
||||
return (is_resource($val) ? stream_get_contents($val) : $val);
|
||||
return $this->fetch(\PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
function fetch_field(): \stdClass {
|
||||
|
@@ -1,31 +1,16 @@
|
||||
<?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 $translations = array(); // key is language code
|
||||
/** @var array<literal-string, string|list<string>>[] */ protected static $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 $this->translations; Adminer\lang() doesn't work for single language versions
|
||||
/** 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): string {
|
||||
protected function lang(string $idf, $number = null) {
|
||||
$args = func_get_args();
|
||||
$args[0] = idx($this->translations[LANG], $idf) ?: $idf;
|
||||
$args[0] = idx(static::$translations[LANG], $idf) ?: $idf;
|
||||
return call_user_func_array('Adminer\lang_format', $args);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
const VERSION = "5.2.1";
|
||||
const VERSION = "5.2.0-dev";
|
||||
|
@@ -13,6 +13,9 @@ 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>.',
|
||||
@@ -349,11 +352,6 @@ 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,7 +137,6 @@ Lang::$translations = array(
|
||||
'User has been created.' => 'Benutzer wurde erstellt.',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => 'Spalte',
|
||||
'Columns' => 'Spalten',
|
||||
'Routine' => 'Routine',
|
||||
'Grant' => 'Erlauben',
|
||||
'Revoke' => 'Widerrufen',
|
||||
@@ -306,7 +305,6 @@ 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,7 +158,6 @@ Lang::$translations = array(
|
||||
'User has been created.' => 'ユーザを作成しました。',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => '列',
|
||||
'Columns' => '列',
|
||||
'Routine' => 'ルーチン',
|
||||
'Grant' => '権限の付与',
|
||||
'Revoke' => '権限の取消し',
|
||||
@@ -308,8 +307,6 @@ 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,6 +13,9 @@ 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>.',
|
||||
@@ -351,11 +354,6 @@ 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
|
||||
|
@@ -54,7 +54,7 @@ if ($_GET["val"] && is_ajax()) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$primary = $unselected = array();
|
||||
$primary = $unselected = null;
|
||||
foreach ($indexes as $index) {
|
||||
if ($index["type"] == "PRIMARY") {
|
||||
$primary = array_flip($index["columns"]);
|
||||
@@ -584,7 +584,7 @@ if (!$columns && support("table")) {
|
||||
}
|
||||
|
||||
if (adminer()->selectImportPrint()) {
|
||||
echo "<p>";
|
||||
echo "<div>";
|
||||
echo "<a href='#import'>" . lang('Import') . "</a>";
|
||||
echo script("qsl('a').onclick = partial(toggle, 'import');", "");
|
||||
echo "<span id='import'" . ($_POST["import"] ? "" : " class='hidden'") . ">: ";
|
||||
@@ -592,6 +592,7 @@ if (!$columns && support("table")) {
|
||||
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"]);
|
||||
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
|
||||
echo "</span>";
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
echo input_token();
|
||||
|
@@ -20,7 +20,6 @@ if (!$error && $_POST["clear"]) {
|
||||
stop_session();
|
||||
|
||||
page_header((isset($_GET["import"]) ? lang('Import') : lang('SQL command')), $error);
|
||||
$line_comment = '--' . (JUSH == 'sql' ? ' ' : '');
|
||||
|
||||
if (!$error && $_POST) {
|
||||
$fp = false;
|
||||
@@ -52,7 +51,7 @@ if (!$error && $_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|$line_comment)[^\n]*\n?|--\r?\n)";
|
||||
$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
|
||||
$delimiter = ";";
|
||||
$offset = 0;
|
||||
$empty = true;
|
||||
@@ -65,7 +64,7 @@ if (!$error && $_POST) {
|
||||
}
|
||||
$commands = 0;
|
||||
$errors = array();
|
||||
$parse = '[\'"' . (JUSH == "sql" ? '`#' : (JUSH == "sqlite" ? '`[' : (JUSH == "mssql" ? '[' : ''))) . ']|/\*|' . $line_comment . '|$' . (JUSH == "pgsql" ? '|\$[^$]*\$' : '');
|
||||
$parse = '[\'"' . (JUSH == "sql" ? '`#' : (JUSH == "sqlite" ? '`[' : (JUSH == "mssql" ? '[' : ''))) . ']|/\*|--' . (JUSH == 'sql' ? ' ' : '') . '|$' . (JUSH == "pgsql" ? '|\$[^$]*\$' : '');
|
||||
$total_start = microtime(true);
|
||||
$adminer_export = get_settings("adminer_import"); // this doesn't offer SQL export so we match the import/export style at select
|
||||
$dump_format = adminer()->dumpFormat();
|
||||
@@ -95,7 +94,7 @@ if (!$error && $_POST) {
|
||||
$pattern =
|
||||
($found == '/*' ? '\*/' :
|
||||
($found == '[' ? ']' :
|
||||
(preg_match("~^$line_comment|^#~", $found) ? "\n" :
|
||||
(preg_match('~^-- |^#~', $found) ? "\n" :
|
||||
preg_quote($found) . ($c_style_escapes ? '|\\\\.' : ''))))
|
||||
;
|
||||
|
||||
@@ -276,7 +275,7 @@ if (!isset($_GET["import"]) && $history) {
|
||||
list($q, $time, $elapsed) = $val;
|
||||
echo '<a href="' . h(ME . "sql=&history=$key") . '">' . lang('Edit') . "</a>"
|
||||
. " <span class='time' title='" . @date('Y-m-d', $time) . "'>" . @date("H:i:s", $time) . "</span>" // @ - time zone may be not set
|
||||
. " <code class='jush-" . JUSH . "'>" . shorten_utf8(ltrim(str_replace("\n", " ", str_replace("\r", "", preg_replace("~^(#|$line_comment).*~m", '', $q)))), 80, "</code>")
|
||||
. " <code class='jush-" . JUSH . "'>" . shorten_utf8(ltrim(str_replace("\n", " ", str_replace("\r", "", preg_replace('~^(#|-- ).*~m', '', $q)))), 80, "</code>")
|
||||
. ($elapsed ? " <span class='time'>($elapsed)</span>" : "")
|
||||
. "<br>\n"
|
||||
;
|
||||
|
@@ -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: 23px -20px .5em 0; box-shadow: 0 -5px 10px 10px var(--bg); }
|
||||
.footer { position: sticky; bottom: 0; margin: 1em -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; }
|
||||
|
27
compile.php
27
compile.php
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include __DIR__ . "/adminer/include/version.inc.php";
|
||||
include __DIR__ . "/adminer/include/errors.inc.php";
|
||||
include __DIR__ . "/externals/JsShrink/jsShrink.php";
|
||||
include __DIR__ . "/externals/PhpShrink/phpShrink.php";
|
||||
|
||||
function add_apo_slashes($s) {
|
||||
@@ -199,19 +198,16 @@ function minify_css($file) {
|
||||
}
|
||||
|
||||
function minify_js($file) {
|
||||
$file = preg_replace_callback("~'use strict';~", function ($match) {
|
||||
static $count = 0;
|
||||
$count++;
|
||||
return ($count == 1 ? $match[0] : ''); // keep only the first one
|
||||
}, $file);
|
||||
if (function_exists('jsShrink')) {
|
||||
$file = jsShrink($file);
|
||||
file_put_contents("compile.js", $file);
|
||||
$terser = shell_exec("terser -c --comments false compile.js"); // prints warning to stderr if terser is not available
|
||||
if ($terser) {
|
||||
$file = $terser;
|
||||
}
|
||||
unlink("compile.js");
|
||||
return lzw_compress($file);
|
||||
}
|
||||
|
||||
// $callback only to match signature
|
||||
function compile_file($match, $callback = '') {
|
||||
function compile_file($match, $callback = '') { // $callback only to match signature
|
||||
global $project;
|
||||
$file = "";
|
||||
list(, $filenames, $callback) = $match;
|
||||
@@ -304,12 +300,7 @@ if ($vendor) {
|
||||
}
|
||||
}
|
||||
if ($project != "editor" && count(Adminer\SqlDriver::$drivers) == 1) {
|
||||
$file = str_replace(
|
||||
'html_select("auth[driver]", SqlDriver::$drivers, DRIVER, "loginDriver(this);")',
|
||||
'input_hidden("auth[driver]", "' . ($vendor == "mysql" ? "server" : $vendor) . '") . "' . reset(Adminer\SqlDriver::$drivers) . '"',
|
||||
$file,
|
||||
$count
|
||||
);
|
||||
$file = str_replace('html_select("auth[driver]", SqlDriver::$drivers, DRIVER, "loginDriver(this);")', 'input_hidden("auth[driver]", "' . ($vendor == "mysql" ? "server" : $vendor) . '") . "' . reset(Adminer\SqlDriver::$drivers) . '"', $file, $count);
|
||||
if (!$count) {
|
||||
echo "auth[driver] form field not found\n";
|
||||
}
|
||||
@@ -330,12 +321,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;background-color:#333;box-shadow:0 0 5px 5px #333;z-index:1}
|
||||
.logout{color:#fff}
|
||||
#logout{color:#333;text-decoration:none;border-bottom:1px dotted}
|
||||
#logout:hover{border-color:#333;background:#333;color:#fff}
|
||||
.js .column{background:#ddd}
|
||||
|
@@ -240,8 +240,6 @@ th {
|
||||
|
||||
.logout {
|
||||
z-index: 2;
|
||||
background-color: #f2eee1;
|
||||
box-shadow: 0 0 5px 5px #f2eee1;
|
||||
}
|
||||
|
||||
.js .column {
|
||||
|
@@ -411,7 +411,6 @@ tbody tr:nth-child(n):hover th {
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
position: fixed;
|
||||
box-shadow: none;
|
||||
}
|
||||
#lang {
|
||||
top: 0;
|
||||
|
@@ -1077,10 +1077,6 @@ body > form{
|
||||
/*position: relative;*/
|
||||
}
|
||||
|
||||
.logout{
|
||||
z-index: 5000;
|
||||
}
|
||||
|
||||
#lang {
|
||||
z-index: 5000;
|
||||
position: absolute;
|
||||
|
@@ -413,8 +413,6 @@ 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,8 +558,6 @@ 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,8 +238,6 @@ th {
|
||||
|
||||
.logout {
|
||||
z-index: 5;
|
||||
background-color: #f2eee1;
|
||||
box-shadow: 0 0 4px 4px #f2eee1;
|
||||
}
|
||||
|
||||
.js .column {
|
||||
|
@@ -318,8 +318,6 @@ input[name=logout]:hover {
|
||||
.logout {
|
||||
position: fixed;
|
||||
z-index:3;
|
||||
background-color: #48A5BF;
|
||||
box-shadow: 0 0 4px 4px #48A5BF;
|
||||
}
|
||||
|
||||
.logout form {
|
||||
|
@@ -69,7 +69,6 @@ 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,17 +244,6 @@ 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.
|
||||
@@ -284,6 +273,15 @@ 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,5 +32,4 @@ if (adminer()->homepage()) {
|
||||
echo "</div>\n";
|
||||
echo "</form>\n";
|
||||
echo script("tableCheck();");
|
||||
adminer()->pluginsLinks();
|
||||
}
|
||||
|
@@ -52,9 +52,6 @@ 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: 10781d1fbf...7a4c6ac9ac
2
externals/jush
vendored
2
externals/jush
vendored
Submodule externals/jush updated: 5fa4d1f97e...c2c986e0d7
18
lang.php
18
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,12 +33,11 @@ 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('~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);
|
||||
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);
|
||||
file_put_contents($filename, $file);
|
||||
update_translations($lang, $messages, $filename, "~(\\\$translations = array\\(.*'$lang' => array\\(\n)(.*)(?=^\t\t\\),)~msU", "\t\t\t");
|
||||
update_translations($lang, $messages, $filename, "~(static \\\$translations = array\\(.*'$lang' => array\\(\n)(.*)(?=^\t\t\\),)~msU", "\t\t\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,8 +46,7 @@ foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.ph
|
||||
function update_translations($lang, $messages, $filename, $pattern, $tabs = "\t") {
|
||||
$file = file_get_contents($filename);
|
||||
$file = str_replace("\r", "", $file);
|
||||
$start = 0;
|
||||
$s = preg_replace_callback($pattern, function ($match) use ($lang, $messages, $filename, $file, $tabs, &$start) {
|
||||
$s = preg_replace_callback($pattern, function ($match) use ($lang, $messages, $filename, $file, $tabs) {
|
||||
$prefix = $match[1][0];
|
||||
$start = $match[2][1];
|
||||
preg_match_all("~^(\\s*(?:// [^'].*\\s+)?)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => (.*[^,\n])),?~m", $match[2][0], $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
|
||||
@@ -76,7 +74,6 @@ function update_translations($lang, $messages, $filename, $pattern, $tabs = "\t"
|
||||
}
|
||||
}
|
||||
if ($messages) {
|
||||
$start += strlen($s);
|
||||
foreach ($messages as $idf => $val) {
|
||||
// add new messages
|
||||
if ($val == "," && strpos($idf, "%d")) {
|
||||
@@ -89,8 +86,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:" . (substr_count($s, "\n", 0, $start) + 1) . ":Updated.\n";
|
||||
echo "$filename updated.\n";
|
||||
}
|
||||
}
|
||||
|
@@ -47,9 +47,7 @@
|
||||
|
||||
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
|
||||
<exclude-pattern>adminer/drivers/</exclude-pattern>
|
||||
<exclude-pattern>adminer/include/db.inc.php</exclude-pattern>
|
||||
<exclude-pattern>adminer/include/pdo.inc.php</exclude-pattern>
|
||||
<exclude-pattern>adminer/plugins/foreign-system.php</exclude-pattern>
|
||||
<exclude-pattern>adminer/plugins/drivers/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
|
@@ -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 extends Adminer\Plugin {
|
||||
class AdminerDotJs {
|
||||
const FILENAME = "adminer.js";
|
||||
|
||||
function head($dark = null) {
|
||||
@@ -16,12 +16,4 @@ class AdminerDotJs extends Adminer\Plugin {
|
||||
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,12 +1,13 @@
|
||||
<?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 extends Adminer\Plugin {
|
||||
class AdminerBackwardKeys {
|
||||
// this is copy-pasted from Adminer Editor
|
||||
|
||||
function backwardKeys($table, $tableName) {
|
||||
@@ -51,15 +52,4 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerBeforeUnload {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -30,11 +30,4 @@ 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 <textarea> including type-ahead of keywords and tables
|
||||
/** Use Codemirror 5 for syntax highlighting and SQL <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 extends Adminer\Plugin {
|
||||
class AdminerCodemirror {
|
||||
private $root;
|
||||
private $minified;
|
||||
|
||||
@@ -97,15 +97,4 @@ 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,18 +51,24 @@ class AdminerConfig extends Adminer\Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
function pluginsLinks() {
|
||||
$link = preg_replace('~\b(db|ns)=[^&]*&~', '', Adminer\ME);
|
||||
echo "<p><a href='" . Adminer\h($link) . "config='>" . $this->lang('Configuration') . "</a>\n";
|
||||
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 screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/config.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
protected static $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.',
|
||||
@@ -78,23 +84,5 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerDarkSwitcher {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -38,15 +38,4 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerDatabaseHide {
|
||||
protected $disabled;
|
||||
|
||||
/**
|
||||
@@ -25,12 +25,4 @@ class AdminerDatabaseHide extends Adminer\Plugin {
|
||||
}
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDesigns {
|
||||
protected $designs;
|
||||
|
||||
/**
|
||||
@@ -38,16 +38,4 @@ class AdminerDesigns extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDumpAlter {
|
||||
|
||||
function dumpFormat() {
|
||||
if (Adminer\DRIVER == 'server') {
|
||||
@@ -167,12 +167,4 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerDumpBz2 {
|
||||
protected $filename, $fp;
|
||||
|
||||
function dumpOutput() {
|
||||
@@ -36,12 +36,4 @@ class AdminerDumpBz2 extends Adminer\Plugin {
|
||||
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,17 +6,9 @@
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerDumpDate {
|
||||
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDumpJson {
|
||||
protected $database = false;
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -57,12 +57,4 @@ class AdminerDumpJson extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDumpPhp {
|
||||
protected $output = array();
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -45,12 +45,4 @@ class AdminerDumpPhp extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDumpXml {
|
||||
protected $database = false;
|
||||
|
||||
function dumpFormat() {
|
||||
@@ -51,12 +51,4 @@ class AdminerDumpXml extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerDumpZip {
|
||||
protected $filename, $data;
|
||||
|
||||
function dumpOutput() {
|
||||
@@ -40,12 +40,4 @@ class AdminerDumpZip extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerEditCalendar {
|
||||
protected $prepend, $langPath;
|
||||
|
||||
/**
|
||||
@@ -50,12 +50,4 @@ class AdminerEditCalendar extends Adminer\Plugin {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerEditForeign {
|
||||
protected $limit;
|
||||
|
||||
function __construct($limit = 0) {
|
||||
@@ -39,12 +39,4 @@ class AdminerEditForeign extends Adminer\Plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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,19 +6,11 @@
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerEditTextarea {
|
||||
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerEditorSetup {
|
||||
private $driver;
|
||||
private $server;
|
||||
private $database;
|
||||
@@ -37,11 +37,4 @@ class AdminerEditorSetup extends Adminer\Plugin {
|
||||
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,17 +6,9 @@
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerEditorViews {
|
||||
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerEmailTable {
|
||||
protected $table, $id, $title, $subject, $message;
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ class AdminerEmailTable extends Adminer\Plugin {
|
||||
* @param string $subject quoted column name
|
||||
* @param string $message quoted column name
|
||||
*/
|
||||
function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
|
||||
function __construct(string $table = "email", string $id = "id", string $title = "subject", string $subject = "subject", string $message = "message") {
|
||||
$this->table = $table;
|
||||
$this->id = $id;
|
||||
$this->title = $title;
|
||||
@@ -54,12 +54,4 @@ class AdminerEmailTable extends Adminer\Plugin {
|
||||
$_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 extends Adminer\Plugin {
|
||||
class AdminerEnumOption {
|
||||
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
if ($field["type"] == "enum") {
|
||||
@@ -32,12 +32,4 @@ class AdminerEnumOption extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerFileUpload {
|
||||
protected $uploadPath, $displayPath, $extensions;
|
||||
|
||||
/**
|
||||
@@ -48,12 +48,4 @@ class AdminerFileUpload extends Adminer\Plugin {
|
||||
$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 extends Adminer\Plugin {
|
||||
class AdminerForeignSystem {
|
||||
|
||||
function foreignKeys($table) {
|
||||
if (Adminer\DRIVER == "server" && Adminer\DB == "mysql") {
|
||||
@@ -105,12 +105,4 @@ class AdminerForeignSystem extends Adminer\Plugin {
|
||||
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
|
||||
/** Allow using Adminer inside a frame (disables ClickJacking protection)
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerFrames {
|
||||
protected $sameOrigin;
|
||||
|
||||
/**
|
||||
* @param bool $sameOrigin allow running from the same origin only
|
||||
*/
|
||||
function __construct($sameOrigin = false) {
|
||||
function __construct(bool $sameOrigin = false) {
|
||||
$this->sameOrigin = $sameOrigin;
|
||||
}
|
||||
|
||||
@@ -23,12 +23,4 @@ class AdminerFrames extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerJsonColumn {
|
||||
private function testJson($value) {
|
||||
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
||||
return $json;
|
||||
@@ -45,12 +45,4 @@ class AdminerJsonColumn extends Adminer\Plugin {
|
||||
$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 extends Adminer\Plugin {
|
||||
class AdminerLoginIp {
|
||||
protected $ips, $forwarded_for;
|
||||
|
||||
/** Set allowed IP addresses
|
||||
@@ -35,12 +35,4 @@ class AdminerLoginIp extends Adminer\Plugin {
|
||||
}
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerLoginOtp {
|
||||
protected $secret;
|
||||
|
||||
/**
|
||||
@@ -22,7 +22,7 @@ class AdminerLoginOtp extends Adminer\Plugin {
|
||||
function loginFormField($name, $heading, $value) {
|
||||
if ($name == 'password') {
|
||||
return $heading . $value . "\n"
|
||||
. "<tr><th><abbr title='" . $this->lang('One Time Password') . "'>OTP</abbr>"
|
||||
. "<tr><th><acronym title='One Time Password' lang='en'>OTP</acronym>"
|
||||
. "<td><input type='number' name='auth[otp]' value='" . Adminer\h($_SESSION["otp"]) . "' size='6' autocomplete='one-time-code' inputmode='numeric' maxlength='6' pattern='\d{6}'>\n"
|
||||
;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class AdminerLoginOtp extends Adminer\Plugin {
|
||||
return;
|
||||
}
|
||||
}
|
||||
return $this->lang('Invalid OTP.');
|
||||
return 'Invalid OTP.';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,30 +50,4 @@ class AdminerLoginOtp extends Adminer\Plugin {
|
||||
$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',
|
||||
'One Time Password' => 'Jednorázové heslo',
|
||||
'Invalid OTP.' => 'Neplatné jednorázové heslo.',
|
||||
),
|
||||
'de' => array(
|
||||
'' => 'Bei der Anmeldung ist ein Einmalpasswort (Zwei-Faktor-Authentifizierung) erforderlich',
|
||||
'One Time Password' => 'Einmal-Passwort',
|
||||
'Invalid OTP.' => 'Ungültiger OTP.',
|
||||
),
|
||||
'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 without password
|
||||
/** Enable login for password-less database
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerLoginPasswordLess {
|
||||
protected $password_hash;
|
||||
|
||||
/** Set allowed password
|
||||
@@ -26,12 +26,4 @@ class AdminerLoginPasswordLess extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerLoginServers {
|
||||
protected $servers;
|
||||
|
||||
/** Set supported servers
|
||||
@@ -37,12 +37,4 @@ class AdminerLoginServers extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerLoginSsl {
|
||||
protected $ssl;
|
||||
|
||||
/**
|
||||
@@ -21,12 +21,4 @@ class AdminerLoginSsl extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerLoginTable {
|
||||
protected $database;
|
||||
|
||||
/** Set database of login table */
|
||||
@@ -26,12 +26,4 @@ class AdminerLoginTable extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerMasterSlave {
|
||||
private $masters = array();
|
||||
|
||||
/**
|
||||
@@ -37,12 +37,4 @@ class AdminerMasterSlave extends Adminer\Plugin {
|
||||
$_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('' => 'マスタ書込みとスレーブ読込みの有効化'),
|
||||
);
|
||||
}
|
||||
|
@@ -16,8 +16,8 @@ class AdminerMenuLinks extends Adminer\Plugin {
|
||||
|
||||
function config() {
|
||||
$options = array(
|
||||
'select' => $this->lang('Select data'),
|
||||
'table' => $this->lang('Show structure'),
|
||||
'select' => Adminer\lang('Select data'),
|
||||
'table' => Adminer\lang('Show structure'),
|
||||
'' => $this->lang('Both'),
|
||||
'auto' => $this->lang('Auto (select on select page, structure otherwise)'),
|
||||
);
|
||||
@@ -28,20 +28,19 @@ class AdminerMenuLinks extends Adminer\Plugin {
|
||||
function tablesPrint(array $tables) {
|
||||
$menu = Adminer\get_setting("menu", "adminer_config") ?: $this->menu;
|
||||
$titles = array(
|
||||
'select' => $this->lang('Select data'),
|
||||
'table' => $this->lang('Show structure'),
|
||||
'select' => Adminer\lang('Select data'),
|
||||
'table' => Adminer\lang('Show structure'),
|
||||
);
|
||||
// this is copied from Adminer::tablesPrint()
|
||||
echo "<ul id='tables'>" . Adminer\script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
|
||||
foreach ($tables as $table => $status) {
|
||||
$table = "$table"; // do not highlight "0" as active everywhere
|
||||
$name = Adminer\adminer()->tableName($status);
|
||||
if ($name != "") {
|
||||
echo '<li>';
|
||||
if (!$menu) {
|
||||
echo '<a href="' . Adminer\h(Adminer\ME) . 'select=' . urlencode($table) . '"'
|
||||
. Adminer\bold($_GET["select"] == $table || $_GET["edit"] == $table, "select")
|
||||
. " title='$titles[select]'>" . $this->lang('select') . "</a> "
|
||||
. " title='$titles[select]'>" . Adminer\lang('select') . "</a> "
|
||||
;
|
||||
}
|
||||
$actives = array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"], $_GET["check"], $_GET["view"]);
|
||||
@@ -68,49 +67,16 @@ class AdminerMenuLinks extends Adminer\Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
function screenshot() {
|
||||
return "https://www.adminer.org/static/plugins/menu-links.png";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
protected static $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)',
|
||||
// this is copied from adminer/lang/
|
||||
'select' => 'vypsat',
|
||||
'Select data' => 'Vypsat data',
|
||||
'Show structure' => 'Zobrazit strukturu',
|
||||
),
|
||||
'pl' => array(
|
||||
'Menu table links' => 'Linki do tabel w menu',
|
||||
'Both' => 'Obie',
|
||||
'Auto (select on select page, structure otherwise)' => 'Auto (pokaż na stronie przeglądania, w przeciwnym razie struktura)',
|
||||
// this is copied from adminer/lang/
|
||||
'select' => 'przeglądaj',
|
||||
'Select data' => 'Pokaż dane',
|
||||
'Show structure' => 'Struktura tabeli',
|
||||
),
|
||||
'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“',
|
||||
// this is copied from adminer/lang/
|
||||
'select' => 'zeigen',
|
||||
'Select data' => 'Daten auswählen',
|
||||
'Show structure' => 'Struktur anzeigen',
|
||||
),
|
||||
'ja' => array(
|
||||
'' => 'メニュー内テーブルへのリンク設定; AdminerConfig との併用可',
|
||||
'Both' => '両方',
|
||||
'Auto (select on select page, structure otherwise)' => '自動 (選択ページでは選択、それ以外では構造)',
|
||||
'Menu table links' => 'メニューテーブルへのリンク',
|
||||
// this is copied from adminer/lang/
|
||||
'select' => '選択',
|
||||
'Select data' => 'データ',
|
||||
'Show structure' => '構造',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -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 extends Adminer\Plugin {
|
||||
class AdminerMonaco {
|
||||
private $root;
|
||||
|
||||
function __construct($root = "https://cdn.jsdelivr.net/npm/monaco-editor@0.52/min/vs") {
|
||||
@@ -71,11 +71,4 @@ 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'),
|
||||
);
|
||||
}
|
||||
|
11
plugins/plugin.php
Normal file
11
plugins/plugin.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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 extends Adminer\Plugin {
|
||||
class AdminerPrettyJsonColumn {
|
||||
private function testJson($value) {
|
||||
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
||||
return $json;
|
||||
@@ -30,12 +30,4 @@ class AdminerPrettyJsonColumn extends Adminer\Plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerPrism {
|
||||
private $editorRoot;
|
||||
private $minified;
|
||||
private $theme;
|
||||
@@ -59,11 +59,4 @@ 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 $translations = array(
|
||||
protected static $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('' => '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ů.')),
|
||||
'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ů.')),
|
||||
'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 extends Adminer\Plugin {
|
||||
class AdminerSlugify {
|
||||
protected $from, $to;
|
||||
|
||||
/**
|
||||
* @param string $from find these characters ...
|
||||
* @param string $to ... and replace them by these
|
||||
*/
|
||||
function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
|
||||
function __construct(string $from = 'áčďéěíňóřšťúůýž', string $to = 'acdeeinorstuuyz') {
|
||||
$this->from = $from;
|
||||
$this->to = $to;
|
||||
}
|
||||
@@ -46,12 +46,4 @@ class AdminerSlugify extends Adminer\Plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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,6 +2,7 @@
|
||||
|
||||
/** 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/
|
||||
@@ -16,7 +17,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($apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', $model = "gemini-2.0-flash") {
|
||||
function __construct(string $apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', string $model = "gemini-2.0-flash") {
|
||||
$this->apiKey = $apiKey;
|
||||
$this->model = $model;
|
||||
}
|
||||
@@ -32,7 +33,7 @@ class AdminerSqlGemini extends Adminer\Plugin {
|
||||
//~ echo $prompt; exit;
|
||||
$context = stream_context_create(array("http" => array(
|
||||
"method" => "POST",
|
||||
"header" => array("User-Agent: AdminerSqlGemini/" . Adminer\VERSION, "Content-Type: application/json"),
|
||||
"header" => array("User-Agent: AdminerSqlGemini", "Content-Type: application/json"),
|
||||
"content" => '{"contents": [{"parts":[{"text": ' . json_encode($prompt) . '}]}]}',
|
||||
"ignore_errors" => true,
|
||||
)));
|
||||
@@ -91,14 +92,9 @@ 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 $translations = array(
|
||||
protected static $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...',
|
||||
),
|
||||
@@ -106,15 +102,5 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerSqlLog {
|
||||
protected $filename;
|
||||
|
||||
/**
|
||||
* @param string $filename defaults to "$database.sql"
|
||||
*/
|
||||
function __construct($filename = "") {
|
||||
function __construct(string $filename = "") {
|
||||
$this->filename = $filename;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,4 @@ class AdminerSqlLog extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerTableIndexesStructure {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param Index[] $indexes data about all indexes on a table
|
||||
*/
|
||||
function tableIndexesPrint($indexes): bool {
|
||||
function tableIndexesPrint(array $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,12 +29,4 @@ class AdminerTableIndexesStructure extends Adminer\Plugin {
|
||||
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 extends Adminer\Plugin {
|
||||
class AdminerTableStructure {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param Field[] $fields data about individual fields
|
||||
@@ -37,12 +37,4 @@ class AdminerTableStructure extends Adminer\Plugin {
|
||||
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
|
||||
|
||||
/** Filter names in tables list
|
||||
/** Use filter 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 extends Adminer\Plugin {
|
||||
class AdminerTablesFilter {
|
||||
function tablesPrint($tables) {
|
||||
?>
|
||||
<script<?php echo Adminer\nonce(); ?>>
|
||||
@@ -67,12 +67,4 @@ 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 extends Adminer\Plugin {
|
||||
class AdminerTinymce {
|
||||
protected $path;
|
||||
|
||||
function __construct($path = "tiny_mce/tiny_mce.js") {
|
||||
function __construct(string $path = "tiny_mce/tiny_mce.js") {
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
@@ -66,12 +66,4 @@ 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 from the translation table (inserts new translations)
|
||||
/** Translate all table and field comments, enum and set values in Editor 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 extends Adminer\Plugin {
|
||||
class AdminerTranslation {
|
||||
|
||||
private function translate($idf) {
|
||||
static $translations, $lang;
|
||||
@@ -50,12 +50,4 @@ class AdminerTranslation extends Adminer\Plugin {
|
||||
$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 extends Adminer\Plugin {
|
||||
class AdminerVersionGithub {
|
||||
|
||||
function head($dark = null) {
|
||||
?>
|
||||
@@ -29,11 +29,4 @@ 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,17 +6,9 @@
|
||||
* @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 extends Adminer\Plugin {
|
||||
class AdminerVersionNoverify {
|
||||
|
||||
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('' => 'バージョンチェックを無効化'),
|
||||
);
|
||||
}
|
||||
|
@@ -1,20 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
foreach (
|
||||
array(
|
||||
'create' => array(1106, 412),
|
||||
'dark' => array(816, 750),
|
||||
'database' => array(896, 666),
|
||||
'db' => array(1258, 752),
|
||||
'dump' => array(784, 450),
|
||||
'edit' => array(1006, 336),
|
||||
'login' => array(628, 326),
|
||||
'select' => array(924, 810),
|
||||
'schema' => array(690, 406),
|
||||
'sql' => array(870, 788),
|
||||
'table' => array(816, 750),
|
||||
) as $filename => list($w, $h)
|
||||
) {
|
||||
foreach (array(
|
||||
'create' => array(1106, 412),
|
||||
'dark' => array(816, 750),
|
||||
'database' => array(896, 666),
|
||||
'db' => array(1258, 752),
|
||||
'dump' => array(784, 450),
|
||||
'edit' => array(1006, 336),
|
||||
'login' => array(628, 326),
|
||||
'select' => array(924, 810),
|
||||
'schema' => array(690, 406),
|
||||
'sql' => array(870, 788),
|
||||
'table' => array(816, 750),
|
||||
) as $filename => list($w, $h)) {
|
||||
$im = imagecreatefrompng("screenshots/$filename.png");
|
||||
$im2 = imagecreatetruecolor($w, $h);
|
||||
imagecopy($im2, $im, 0, 0, 0, 0, $w, $h);
|
||||
|
Reference in New Issue
Block a user