ARI Adminer – WordPress Database Manager - Version 1.0.8

Version Description

  • Update Adminer to v. 4.3.0
Download this release

Release Info

Developer arisoft
Plugin Icon 128x128 ARI Adminer – WordPress Database Manager
Version 1.0.8
Comparing to
See all releases

Code changes from version 1.0.7 to 1.0.8

Files changed (90) hide show
  1. adminer/adminer/adminer/call.inc.php +1 -1
  2. adminer/adminer/adminer/create.inc.php +0 -1
  3. adminer/adminer/adminer/db.inc.php +6 -7
  4. adminer/adminer/adminer/drivers/elastic.inc.php +5 -4
  5. adminer/adminer/adminer/drivers/mssql.inc.php +20 -7
  6. adminer/adminer/adminer/drivers/mysql.inc.php +24 -7
  7. adminer/adminer/adminer/drivers/pgsql.inc.php +127 -15
  8. adminer/adminer/adminer/file.inc.php +2 -1
  9. adminer/adminer/adminer/foreign.inc.php +11 -9
  10. adminer/adminer/adminer/include/adminer.inc.php +66 -10
  11. adminer/adminer/adminer/include/auth.inc.php +1 -2
  12. adminer/adminer/adminer/include/connect.inc.php +6 -4
  13. adminer/adminer/adminer/include/editing.inc.php +20 -21
  14. adminer/adminer/adminer/include/functions.inc.php +29 -26
  15. adminer/adminer/adminer/include/pdo.inc.php +2 -2
  16. adminer/adminer/adminer/include/version.inc.php +1 -1
  17. adminer/adminer/adminer/index.php +3 -1
  18. adminer/adminer/adminer/indexes.inc.php +10 -7
  19. adminer/adminer/adminer/lang/ar.inc.php +0 -1
  20. adminer/adminer/adminer/lang/bg.inc.php +1 -3
  21. adminer/adminer/adminer/lang/bn.inc.php +0 -1
  22. adminer/adminer/adminer/lang/bs.inc.php +0 -1
  23. adminer/adminer/adminer/lang/ca.inc.php +0 -1
  24. adminer/adminer/adminer/lang/cs.inc.php +10 -4
  25. adminer/adminer/adminer/lang/da.inc.php +0 -1
  26. adminer/adminer/adminer/lang/de.inc.php +0 -1
  27. adminer/adminer/adminer/lang/el.inc.php +1 -3
  28. adminer/adminer/adminer/lang/es.inc.php +0 -1
  29. adminer/adminer/adminer/lang/et.inc.php +0 -1
  30. adminer/adminer/adminer/lang/fa.inc.php +1 -3
  31. adminer/adminer/adminer/lang/fi.inc.php +1 -3
  32. adminer/adminer/adminer/lang/fr.inc.php +1 -3
  33. adminer/adminer/adminer/lang/gl.inc.php +1 -3
  34. adminer/adminer/adminer/lang/hu.inc.php +0 -1
  35. adminer/adminer/adminer/lang/id.inc.php +49 -50
  36. adminer/adminer/adminer/lang/it.inc.php +0 -1
  37. adminer/adminer/adminer/lang/ja.inc.php +0 -1
  38. adminer/adminer/adminer/lang/ko.inc.php +0 -1
  39. adminer/adminer/adminer/lang/lt.inc.php +0 -1
  40. adminer/adminer/adminer/lang/nl.inc.php +1 -2
  41. adminer/adminer/adminer/lang/no.inc.php +0 -1
  42. adminer/adminer/adminer/lang/pl.inc.php +1 -3
  43. adminer/adminer/adminer/lang/pt-br.inc.php +0 -1
  44. adminer/adminer/adminer/lang/pt.inc.php +0 -1
  45. adminer/adminer/adminer/lang/ro.inc.php +0 -1
  46. adminer/adminer/adminer/lang/ru.inc.php +0 -1
  47. adminer/adminer/adminer/lang/sk.inc.php +0 -1
  48. adminer/adminer/adminer/lang/sl.inc.php +0 -1
  49. adminer/adminer/adminer/lang/sr.inc.php +0 -1
  50. adminer/adminer/adminer/lang/ta.inc.php +0 -1
  51. adminer/adminer/adminer/lang/th.inc.php +0 -1
  52. adminer/adminer/adminer/lang/tr.inc.php +0 -1
  53. adminer/adminer/adminer/lang/uk.inc.php +0 -1
  54. adminer/adminer/adminer/lang/vi.inc.php +0 -1
  55. adminer/adminer/adminer/lang/xx.inc.php +6 -4
  56. adminer/adminer/adminer/lang/zh-tw.inc.php +0 -1
  57. adminer/adminer/adminer/lang/zh.inc.php +0 -1
  58. adminer/adminer/adminer/privileges.inc.php +2 -2
  59. adminer/adminer/adminer/replication.inc.php +30 -0
  60. adminer/adminer/adminer/select.inc.php +5 -2
  61. adminer/adminer/adminer/sql.inc.php +1 -1
  62. adminer/adminer/adminer/sqlite.php +8 -0
  63. adminer/adminer/adminer/static/default.css +7 -1
  64. adminer/adminer/adminer/static/editing.js +16 -0
  65. adminer/adminer/adminer/static/functions.js +16 -5
  66. adminer/adminer/adminer/table.inc.php +3 -26
  67. adminer/adminer/adminer/view.inc.php +10 -11
  68. adminer/adminer/editor/db.inc.php +1 -1
  69. adminer/adminer/editor/index.php +1 -1
  70. adminer/adminer/plugins/database-hide.php +1 -1
  71. adminer/adminer/plugins/dump-alter.php +1 -1
  72. adminer/adminer/plugins/dump-bz2.php +1 -1
  73. adminer/adminer/plugins/dump-date.php +1 -1
  74. adminer/adminer/plugins/dump-json.php +1 -1
  75. adminer/adminer/plugins/dump-xml.php +1 -1
  76. adminer/adminer/plugins/dump-zip.php +1 -1
  77. adminer/adminer/plugins/edit-foreign.php +6 -2
  78. adminer/adminer/plugins/enum-option.php +1 -1
  79. adminer/adminer/plugins/file-upload.php +1 -1
  80. adminer/adminer/plugins/foreign-system.php +1 -1
  81. adminer/adminer/plugins/frames.php +1 -1
  82. adminer/adminer/plugins/json-column.php +1 -1
  83. adminer/adminer/plugins/plugin.php +16 -1
  84. adminer/adminer/plugins/slugify.php +1 -1
  85. adminer/adminer/plugins/tables-filter.php +51 -17
  86. adminer/adminer/plugins/translation.php +1 -1
  87. ari-adminer.php +1 -1
  88. includes/defines.php +1 -1
  89. languages/ari-adminer.pot +37 -24
  90. readme.txt +8 -2
adminer/adminer/adminer/call.inc.php CHANGED
@@ -29,7 +29,7 @@ if (!$error && $_POST) {
29
  $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
30
  }
31
 
32
- $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")";
33
  echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
34
 
35
  if (!$connection->multi_query($query)) {
29
  $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
30
  }
31
 
32
+ $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
33
  echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
34
 
35
  if (!$connection->multi_query($query)) {
adminer/adminer/adminer/create.inc.php CHANGED
@@ -35,7 +35,6 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
35
  $all_fields = array();
36
  $use_all_fields = false;
37
  $foreign = array();
38
- ksort($row["fields"]);
39
  $orig_field = reset($orig_fields);
40
  $after = " FIRST";
41
 
35
  $all_fields = array();
36
  $use_all_fields = false;
37
  $foreign = array();
 
38
  $orig_field = reset($orig_fields);
39
  $after = " FIRST";
40
 
adminer/adminer/adminer/db.inc.php CHANGED
@@ -62,10 +62,9 @@ if ($adminer->homepage()) {
62
  search_tables();
63
  }
64
  }
65
- echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
66
-
67
- echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);">';
68
  $doc_link = doc_link(array('sql' => 'show-table-status.html'));
 
 
69
  echo '<th>' . lang('Table');
70
  echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
71
  echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html'));
@@ -80,10 +79,11 @@ if ($adminer->homepage()) {
80
  $tables = 0;
81
  foreach ($tables_list as $name => $type) {
82
  $view = ($type !== null && !preg_match('~table~i', $type));
83
- echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');");
84
- echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name));
 
85
  if ($view) {
86
- echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized View') : lang('View')) . '</a>';
87
  echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
88
  } else {
89
  foreach (array(
@@ -145,7 +145,6 @@ if ($adminer->homepage()) {
145
 
146
  echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
147
  echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : "");
148
- echo (support("materializedview") ? '<a href="' . h(ME) . 'view=&amp;materialized=1">' . lang('Create materialized view') . "</a>\n" : "");
149
 
150
  if (support("routine")) {
151
  echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
62
  search_tables();
63
  }
64
  }
 
 
 
65
  $doc_link = doc_link(array('sql' => 'show-table-status.html'));
66
+ echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
67
+ echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);" class="jsonly">';
68
  echo '<th>' . lang('Table');
69
  echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
70
  echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html'));
79
  $tables = 0;
80
  foreach ($tables_list as $name => $type) {
81
  $view = ($type !== null && !preg_match('~table~i', $type));
82
+ $id = h("Table-" . $name);
83
+ echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $id);
84
+ echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
85
  if ($view) {
86
+ echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . '</a>';
87
  echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
88
  } else {
89
  foreach (array(
145
 
146
  echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
147
  echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : "");
 
148
 
149
  if (support("routine")) {
150
  echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
adminer/adminer/adminer/drivers/elastic.inc.php CHANGED
@@ -59,7 +59,8 @@ if (isset($_GET["elastic"])) {
59
  }
60
 
61
  function connect($server, $username, $password) {
62
- $this->_url = "http://$username:$password@$server/";
 
63
  $return = $this->query('');
64
  if ($return) {
65
  $this->server_info = $return['version']['number'];
@@ -257,9 +258,9 @@ if (isset($_GET["elastic"])) {
257
  "Engine" => "table",
258
  "Rows" => $table["count"],
259
  );
260
- }
261
- if ($name != "" && $name == $table["term"]) {
262
- return $return[$name];
263
  }
264
  }
265
  return $return;
59
  }
60
 
61
  function connect($server, $username, $password) {
62
+ preg_match('~^(https?://)?(.*)~', $server, $match);
63
+ $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
64
  $return = $this->query('');
65
  if ($return) {
66
  $this->server_info = $return['version']['number'];
258
  "Engine" => "table",
259
  "Rows" => $table["count"],
260
  );
261
+ if ($name != "" && $name == $table["term"]) {
262
+ return $return[$name];
263
+ }
264
  }
265
  }
266
  return $return;
adminer/adminer/adminer/drivers/mssql.inc.php CHANGED
@@ -8,7 +8,7 @@
8
  $drivers["mssql"] = "MS SQL";
9
 
10
  if (isset($_GET["mssql"])) {
11
- $possible_drivers = array("SQLSRV", "MSSQL");
12
  define("DRIVER", "mssql");
13
  if (extension_loaded("sqlsrv")) {
14
  class Min_DB {
@@ -109,11 +109,11 @@ if (isset($_GET["mssql"])) {
109
  }
110
 
111
  function fetch_assoc() {
112
- return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC, SQLSRV_SCROLL_NEXT));
113
  }
114
 
115
  function fetch_row() {
116
- return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC, SQLSRV_SCROLL_NEXT));
117
  }
118
 
119
  function fetch_field() {
@@ -164,7 +164,7 @@ if (isset($_GET["mssql"])) {
164
  }
165
 
166
  function query($query, $unbuffered = false) {
167
- $result = mssql_query($query, $this->_link); //! $unbuffered
168
  $this->error = "";
169
  if (!$result) {
170
  $this->error = mssql_get_last_message();
@@ -186,7 +186,7 @@ if (isset($_GET["mssql"])) {
186
  }
187
 
188
  function next_result() {
189
- return mssql_next_result($this->_result);
190
  }
191
 
192
  function result($query, $field = 0) {
@@ -234,8 +234,21 @@ if (isset($_GET["mssql"])) {
234
  }
235
  }
236
 
237
- }
 
 
 
 
 
 
 
238
 
 
 
 
 
 
 
239
 
240
 
241
  class Min_Driver extends Min_SQL {
@@ -288,7 +301,7 @@ if (isset($_GET["mssql"])) {
288
  }
289
 
290
  function get_databases() {
291
- return get_vals("EXEC sp_databases");
292
  }
293
 
294
  function limit($query, $where, $limit, $offset = 0, $separator = " ") {
8
  $drivers["mssql"] = "MS SQL";
9
 
10
  if (isset($_GET["mssql"])) {
11
+ $possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
12
  define("DRIVER", "mssql");
13
  if (extension_loaded("sqlsrv")) {
14
  class Min_DB {
109
  }
110
 
111
  function fetch_assoc() {
112
+ return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC));
113
  }
114
 
115
  function fetch_row() {
116
+ return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC));
117
  }
118
 
119
  function fetch_field() {
164
  }
165
 
166
  function query($query, $unbuffered = false) {
167
+ $result = @mssql_query($query, $this->_link); //! $unbuffered
168
  $this->error = "";
169
  if (!$result) {
170
  $this->error = mssql_get_last_message();
186
  }
187
 
188
  function next_result() {
189
+ return mssql_next_result($this->_result->_result);
190
  }
191
 
192
  function result($query, $field = 0) {
234
  }
235
  }
236
 
237
+ } elseif (extension_loaded("pdo_dblib")) {
238
+ class Min_DB extends Min_PDO {
239
+ var $extension = "PDO_DBLIB";
240
+
241
+ function connect($server, $username, $password) {
242
+ $this->dsn("dblib:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
243
+ return true;
244
+ }
245
 
246
+ function select_db($database) {
247
+ // database selection is separated from the connection so dbname in DSN can't be used
248
+ return $this->query("USE " . idf_escape($database));
249
+ }
250
+ }
251
+ }
252
 
253
 
254
  class Min_Driver extends Min_SQL {
301
  }
302
 
303
  function get_databases() {
304
+ return get_vals("SELECT name FROM sys.databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb')");
305
  }
306
 
307
  function limit($query, $where, $limit, $offset = 0, $separator = " ") {
adminer/adminer/adminer/drivers/mysql.inc.php CHANGED
@@ -301,12 +301,16 @@ if (!defined("DRIVER")) {
301
  * @return mixed Min_DB or string for error
302
  */
303
  function connect() {
304
- global $adminer;
305
  $connection = new Min_DB;
306
  $credentials = $adminer->credentials();
307
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
308
  $connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
309
  $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
 
 
 
 
310
  return $connection;
311
  }
312
  $return = $connection->error;
@@ -429,7 +433,7 @@ if (!defined("DRIVER")) {
429
  global $connection;
430
  $return = array();
431
  foreach (get_rows($fast && $connection->server_info >= 5
432
- ? "SELECT TABLE_NAME AS Name, Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
433
  : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
434
  ) as $row) {
435
  if ($row["Engine"] == "InnoDB") {
@@ -500,10 +504,11 @@ if (!defined("DRIVER")) {
500
  function indexes($table, $connection2 = null) {
501
  $return = array();
502
  foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
503
- $return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? "INDEX" : "UNIQUE")));
504
- $return[$row["Key_name"]]["columns"][] = $row["Column_name"];
505
- $return[$row["Key_name"]]["lengths"][] = $row["Sub_part"];
506
- $return[$row["Key_name"]]["descs"][] = null;
 
507
  }
508
  return $return;
509
  }
@@ -972,6 +977,14 @@ if (!defined("DRIVER")) {
972
  return get_key_vals("SHOW STATUS");
973
  }
974
 
 
 
 
 
 
 
 
 
975
  /** Convert field in select and edit
976
  * @param array one element from fields()
977
  * @return string
@@ -1012,13 +1025,17 @@ if (!defined("DRIVER")) {
1012
  */
1013
  function support($feature) {
1014
  global $connection;
1015
- return !preg_match("~scheme|sequence|type|view_trigger" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
1016
  }
1017
 
1018
  function kill_process($val) {
1019
  return queries("KILL " . number($val));
1020
  }
1021
 
 
 
 
 
1022
  function max_connections() {
1023
  global $connection;
1024
  return $connection->result("SELECT @@max_connections");
301
  * @return mixed Min_DB or string for error
302
  */
303
  function connect() {
304
+ global $adminer, $types, $structured_types;
305
  $connection = new Min_DB;
306
  $credentials = $adminer->credentials();
307
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
308
  $connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
309
  $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
310
+ if (version_compare($connection->server_info, '5.7.8') >= 0) {
311
+ $structured_types[lang('Strings')][] = "json";
312
+ $types["json"] = 4294967295;
313
+ }
314
  return $connection;
315
  }
316
  $return = $connection->error;
433
  global $connection;
434
  $return = array();
435
  foreach (get_rows($fast && $connection->server_info >= 5
436
+ ? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
437
  : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
438
  ) as $row) {
439
  if ($row["Engine"] == "InnoDB") {
504
  function indexes($table, $connection2 = null) {
505
  $return = array();
506
  foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
507
+ $name = $row["Key_name"];
508
+ $return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
509
+ $return[$name]["columns"][] = $row["Column_name"];
510
+ $return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
511
+ $return[$name]["descs"][] = null;
512
  }
513
  return $return;
514
  }
977
  return get_key_vals("SHOW STATUS");
978
  }
979
 
980
+ /** Get replication status of master or slave
981
+ * @param string
982
+ * @return array ($name => $value)
983
+ */
984
+ function replication_status($type) {
985
+ return get_rows("SHOW $type STATUS");
986
+ }
987
+
988
  /** Convert field in select and edit
989
  * @param array one element from fields()
990
  * @return string
1025
  */
1026
  function support($feature) {
1027
  global $connection;
1028
+ return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
1029
  }
1030
 
1031
  function kill_process($val) {
1032
  return queries("KILL " . number($val));
1033
  }
1034
 
1035
+ function connection_id(){
1036
+ return "SELECT CONNECTION_ID()";
1037
+ }
1038
+
1039
  function max_connections() {
1040
  global $connection;
1041
  return $connection->result("SELECT @@max_connections");
adminer/adminer/adminer/drivers/pgsql.inc.php CHANGED
@@ -199,7 +199,7 @@ if (isset($_GET["pgsql"])) {
199
  }
200
 
201
  function get_databases() {
202
- return get_vals("SELECT datname FROM pg_database ORDER BY datname");
203
  }
204
 
205
  function limit($query, $where, $limit, $offset = 0, $separator = " ") {
@@ -244,10 +244,10 @@ ORDER BY 1";
244
 
245
  function table_status($name = "") {
246
  $return = array();
247
- foreach (get_rows("SELECT relname AS \"Name\", CASE relkind WHEN 'r' THEN 'table' WHEN 'mv' THEN 'materialized view' WHEN 'f' THEN 'foreign table' ELSE 'view' END AS \"Engine\", pg_relation_size(oid) AS \"Data_length\", pg_total_relation_size(oid) - pg_relation_size(oid) AS \"Index_length\", obj_description(oid, 'pg_class') AS \"Comment\", relhasoids::int AS \"Oid\", reltuples as \"Rows\"
248
- FROM pg_class
249
- WHERE relkind IN ('r','v','mv','f')
250
- AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
251
  " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
252
  ) as $row) { //! Index_length, Auto_increment
253
  $return[$row["Name"]] = $row;
@@ -311,9 +311,9 @@ ORDER BY a.attnum"
311
  $return = array();
312
  $table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table));
313
  $columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2);
314
- foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) {
315
  $relname = $row["relname"];
316
- $return[$relname]["type"] = ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX"));
317
  $return[$relname]["columns"] = array();
318
  foreach (explode(" ", $row["indkey"]) as $indkey) {
319
  $return[$relname]["columns"][] = $columns[$indkey];
@@ -330,7 +330,7 @@ ORDER BY a.attnum"
330
  function foreign_keys($table) {
331
  global $on_actions;
332
  $return = array();
333
- foreach (get_rows("SELECT conname, pg_get_constraintdef(oid) AS definition
334
  FROM pg_constraint
335
  WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema())
336
  AND contype = 'f'::char
@@ -352,7 +352,7 @@ ORDER BY conkey, conname") as $row) {
352
 
353
  function view($name) {
354
  global $connection;
355
- return array("select" => $connection->result("SELECT pg_get_viewdef(" . q($name) . ")"));
356
  }
357
 
358
  function collations() {
@@ -488,7 +488,7 @@ ORDER BY conkey, conname") as $row) {
488
 
489
  function drop_tables($tables) {
490
  foreach ($tables as $table) {
491
- $status = table_status($table);
492
  if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
493
  return false;
494
  }
@@ -506,18 +506,21 @@ ORDER BY conkey, conname") as $row) {
506
  return true;
507
  }
508
 
509
- function trigger($name) {
510
  if ($name == "") {
511
  return array("Statement" => "EXECUTE PROCEDURE ()");
512
  }
513
- $rows = get_rows('SELECT trigger_name AS "Trigger", condition_timing AS "Timing", event_manipulation AS "Event", \'FOR EACH \' || action_orientation AS "Type", action_statement AS "Statement" FROM information_schema.triggers WHERE event_object_table = ' . q($_GET["trigger"]) . ' AND trigger_name = ' . q($name));
 
 
 
514
  return reset($rows);
515
  }
516
 
517
  function triggers($table) {
518
  $return = array();
519
  foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
520
- $return[$row["trigger_name"]] = array($row["condition_timing"], $row["event_manipulation"]);
521
  }
522
  return $return;
523
  }
@@ -606,6 +609,111 @@ AND typelem = 0"
606
  return $return;
607
  }
608
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609
  function use_sql($database) {
610
  return "\connect " . idf_escape($database);
611
  }
@@ -631,11 +739,15 @@ AND typelem = 0"
631
 
632
  function support($feature) {
633
  global $connection;
634
- return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col|kill)$~', $feature); //! routine|
635
  }
636
 
637
  function kill_process($val) {
638
- return queries("SELECT pg_terminate_backend(" . number($val).")");
 
 
 
 
639
  }
640
 
641
  function max_connections() {
199
  }
200
 
201
  function get_databases() {
202
+ return get_vals("SELECT datname FROM pg_database WHERE has_database_privilege(datname, 'CONNECT') ORDER BY datname");
203
  }
204
 
205
  function limit($query, $where, $limit, $offset = 0, $separator = " ") {
244
 
245
  function table_status($name = "") {
246
  $return = array();
247
+ foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", pg_relation_size(c.oid) AS \"Data_length\", pg_indexes_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", c.relhasoids::int AS \"Oid\", c.reltuples as \"Rows\", n.nspname
248
+ FROM pg_class c
249
+ JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
250
+ WHERE relkind IN ('r', 'm', 'v')
251
  " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
252
  ) as $row) { //! Index_length, Auto_increment
253
  $return[$row["Name"]] = $row;
311
  $return = array();
312
  $table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table));
313
  $columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2);
314
+ foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption , (indpred IS NOT NULL)::int as indispartial FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) {
315
  $relname = $row["relname"];
316
+ $return[$relname]["type"] = ($row["indispartial"] ? "INDEX" : ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX")));
317
  $return[$relname]["columns"] = array();
318
  foreach (explode(" ", $row["indkey"]) as $indkey) {
319
  $return[$relname]["columns"][] = $columns[$indkey];
330
  function foreign_keys($table) {
331
  global $on_actions;
332
  $return = array();
333
+ foreach (get_rows("SELECT conname, condeferrable::int AS deferrable, pg_get_constraintdef(oid) AS definition
334
  FROM pg_constraint
335
  WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema())
336
  AND contype = 'f'::char
352
 
353
  function view($name) {
354
  global $connection;
355
+ return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . q($name) . ")")));
356
  }
357
 
358
  function collations() {
488
 
489
  function drop_tables($tables) {
490
  foreach ($tables as $table) {
491
+ $status = table_status($table);
492
  if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
493
  return false;
494
  }
506
  return true;
507
  }
508
 
509
+ function trigger($name, $table = null) {
510
  if ($name == "") {
511
  return array("Statement" => "EXECUTE PROCEDURE ()");
512
  }
513
+ if ($table === null) {
514
+ $table = $_GET['trigger'];
515
+ }
516
+ $rows = get_rows('SELECT t.trigger_name AS "Trigger", t.action_timing AS "Timing", (SELECT STRING_AGG(event_manipulation, \' OR \') FROM information_schema.triggers WHERE event_object_table = t.event_object_table AND trigger_name = t.trigger_name ) AS "Events", t.event_manipulation AS "Event", \'FOR EACH \' || t.action_orientation AS "Type", t.action_statement AS "Statement" FROM information_schema.triggers t WHERE t.event_object_table = ' . q($table) . ' AND t.trigger_name = ' . q($name));
517
  return reset($rows);
518
  }
519
 
520
  function triggers($table) {
521
  $return = array();
522
  foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
523
+ $return[$row["trigger_name"]] = array($row["action_timing"], $row["event_manipulation"]);
524
  }
525
  return $return;
526
  }
609
  return $return;
610
  }
611
 
612
+ /** Get SQL command to create table
613
+ * @param string
614
+ * @param bool
615
+ * @return string
616
+ */
617
+ function create_sql($table, $auto_increment) {
618
+ global $connection;
619
+ $return = '';
620
+ $return_parts = array();
621
+ $sequences = array();
622
+
623
+ $status = table_status($table);
624
+ $fields = fields($table);
625
+ $indexes = indexes($table);
626
+ ksort($indexes);
627
+ $fkeys = foreign_keys($table);
628
+ ksort($fkeys);
629
+ $triggers = triggers($table);
630
+
631
+ if (!$status || empty($fields)) {
632
+ return false;
633
+ }
634
+
635
+ $return = "CREATE TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " (\n ";
636
+
637
+ // fields' definitions
638
+ foreach ($fields as $field_name => $field) {
639
+ $part = idf_escape($field['field']) . ' ' . $field['full_type']
640
+ . (is_null($field['default']) ? "" : " DEFAULT $field[default]")
641
+ . ($field['attnotnull'] ? "" : " NOT NULL");
642
+ $return_parts[] = $part;
643
+
644
+ // sequences for fields
645
+ if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
646
+ $sequence_name = $matches[1];
647
+ $sq = reset(get_rows("SELECT * FROM $sequence_name"));
648
+ $sequences[] = "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value] START " . ($auto_increment ? $sq['last_value'] : 1) . " CACHE $sq[cache_value];";
649
+ }
650
+ }
651
+
652
+ // adding sequences before table definition
653
+ if (!empty($sequences)) {
654
+ $return = implode("\n\n", $sequences) . "\n\n$return";
655
+ }
656
+
657
+ // primary + unique keys
658
+ foreach ($indexes as $index_name => $index) {
659
+ switch($index['type']) {
660
+ case 'UNIQUE': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " UNIQUE (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
661
+ case 'PRIMARY': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " PRIMARY KEY (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
662
+ }
663
+ }
664
+
665
+ // foreign keys
666
+ foreach ($fkeys as $fkey_name => $fkey) {
667
+ $return_parts[] = "CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE');
668
+ }
669
+
670
+ $return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");";
671
+
672
+ // "basic" indexes after table definition
673
+ foreach ($indexes as $index_name => $index) {
674
+ if ($index['type'] == 'INDEX') {
675
+ $return .= "\n\nCREATE INDEX " . idf_escape($index_name) . " ON " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " USING btree (" . implode(', ', array_map('idf_escape', $index['columns'])) . ");";
676
+ }
677
+ }
678
+
679
+ // coments for table & fields
680
+ if ($status['Comment']) {
681
+ $return .= "\n\nCOMMENT ON TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " IS " . q($status['Comment']) . ";";
682
+ }
683
+
684
+ foreach ($fields as $field_name => $field) {
685
+ if ($field['comment']) {
686
+ $return .= "\n\nCOMMENT ON COLUMN " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . "." . idf_escape($field_name) . " IS " . q($field['comment']) . ";";
687
+ }
688
+ }
689
+
690
+ // triggers
691
+ foreach ($triggers as $trg_id => $trg) {
692
+ $trigger = trigger($trg_id, $status['Name']);
693
+ $return .= "\n\nCREATE TRIGGER " . idf_escape($trigger['Trigger']) . " $trigger[Timing] $trigger[Events] ON " . idf_escape($status["nspname"]) . "." . idf_escape($status['Name']) . " $trigger[Type] $trigger[Statement];";
694
+ }
695
+
696
+ return rtrim($return, ';');
697
+ }
698
+
699
+ /** Get SQL commands to create triggers
700
+ * @param string
701
+ * @param string
702
+ * @return string
703
+ */
704
+ //@TODO
705
+ function trigger_sql($table, $style) {
706
+ $return = "";
707
+ //foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
708
+ // $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "")
709
+ // . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
710
+ //}
711
+ //return $return;
712
+
713
+ return false;
714
+ }
715
+
716
+
717
  function use_sql($database) {
718
  return "\connect " . idf_escape($database);
719
  }
739
 
740
  function support($feature) {
741
  global $connection;
742
+ return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature); //! routine|
743
  }
744
 
745
  function kill_process($val) {
746
+ return queries("SELECT pg_terminate_backend(" . number($val) . ")");
747
+ }
748
+
749
+ function connection_id(){
750
+ return "SELECT pg_backend_pid()";
751
  }
752
 
753
  function max_connections() {
adminer/adminer/adminer/file.inc.php CHANGED
@@ -6,6 +6,7 @@ if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
6
 
7
  header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
8
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 
9
 
10
  if ($_GET["file"] == "favicon.ico") {
11
  header("Content-Type: image/x-icon");
@@ -18,7 +19,7 @@ if ($_GET["file"] == "favicon.ico") {
18
  echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
19
  } elseif ($_GET["file"] == "jush.js") {
20
  header("Content-Type: text/javascript; charset=utf-8");
21
- echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
22
  } else {
23
  header("Content-Type: image/gif");
24
  switch ($_GET["file"]) {
6
 
7
  header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
8
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
9
+ header("Cache-Control: immutable");
10
 
11
  if ($_GET["file"] == "favicon.ico") {
12
  header("Content-Type: image/x-icon");
19
  echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
20
  } elseif ($_GET["file"] == "jush.js") {
21
  header("Content-Type: text/javascript; charset=utf-8");
22
+ echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
23
  } else {
24
  header("Content-Type: image/gif");
25
  switch ($_GET["file"]) {
adminer/adminer/adminer/foreign.inc.php CHANGED
@@ -7,13 +7,15 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
7
  $message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
8
  $location = ME . "table=" . urlencode($TABLE);
9
 
10
- $row["source"] = array_filter($row["source"], 'strlen');
11
- ksort($row["source"]); // enforce input order
12
- $target = array();
13
- foreach ($row["source"] as $key => $val) {
14
- $target[$key] = $row["target"][$key];
 
 
 
15
  }
16
- $row["target"] = $target;
17
 
18
  if ($jush == "sqlite") {
19
  queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
@@ -60,13 +62,13 @@ $referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
60
  <input type="hidden" name="change-js" value="">
61
  <noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
62
  <table cellspacing="0">
63
- <thead><tr><th><?php echo lang('Source'); ?><th><?php echo lang('Target'); ?></thead>
64
  <?php
65
  $j = 0;
66
  foreach ($row["source"] as $key => $val) {
67
  echo "<tr>";
68
- echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1));
69
- echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key]);
70
  $j++;
71
  }
72
  ?>
7
  $message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
8
  $location = ME . "table=" . urlencode($TABLE);
9
 
10
+ if (!$_POST["drop"]) {
11
+ $row["source"] = array_filter($row["source"], 'strlen');
12
+ ksort($row["source"]); // enforce input order
13
+ $target = array();
14
+ foreach ($row["source"] as $key => $val) {
15
+ $target[$key] = $row["target"][$key];
16
+ }
17
+ $row["target"] = $target;
18
  }
 
19
 
20
  if ($jush == "sqlite") {
21
  queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
62
  <input type="hidden" name="change-js" value="">
63
  <noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
64
  <table cellspacing="0">
65
+ <thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
66
  <?php
67
  $j = 0;
68
  foreach ($row["source"] as $key => $val) {
69
  echo "<tr>";
70
+ echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1), "label-source");
71
+ echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
72
  $j++;
73
  }
74
  ?>
adminer/adminer/adminer/include/adminer.inc.php CHANGED
@@ -110,7 +110,7 @@ focus(document.getElementById('username'));
110
  function login($login, $password) {
111
  global $jush;
112
  if ($jush == "sqlite") {
113
- return lang('Implement %s method to use SQLite.', 'login()');
114
  }
115
  return true;
116
  }
@@ -197,6 +197,15 @@ focus(document.getElementById('username'));
197
  ;
198
  }
199
 
 
 
 
 
 
 
 
 
 
200
  /** Description of a row in a table
201
  * @param string
202
  * @return string SQL expression, empty string for no description
@@ -232,7 +241,10 @@ focus(document.getElementById('username'));
232
  function selectVal($val, $link, $field, $original) {
233
  $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
234
  if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
235
- $return = lang('%d byte(s)', strlen($original));
 
 
 
236
  }
237
  return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return);
238
  }
@@ -246,6 +258,45 @@ focus(document.getElementById('username'));
246
  return $val;
247
  }
248
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  /** Print columns box in select
250
  * @param array result of selectColumnsProcess()[0]
251
  * @param array selectable columns
@@ -352,8 +403,9 @@ focus(document.getElementById('username'));
352
  echo "var indexColumns = ";
353
  $columns = array();
354
  foreach ($indexes as $index) {
355
- if ($index["type"] != "FULLTEXT") {
356
- $columns[reset($index["columns"])] = 1;
 
357
  }
358
  }
359
  $columns[""] = 1;
@@ -806,11 +858,14 @@ focus(document.getElementById('username'));
806
  $connection->select_db(DB);
807
  $tables = table_status('', true);
808
  }
809
- if (support("sql")) {
810
- ?>
811
  <script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
812
  <script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
813
  <script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
 
 
 
 
814
  <script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
815
  <script type="text/javascript">
816
  <?php
@@ -886,17 +941,18 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
886
  * @return null
887
  */
888
  function tablesPrint($tables) {
889
- echo "<p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
890
  foreach ($tables as $table => $status) {
891
- echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
892
  $name = $this->tableName($status);
893
  echo (support("table") || support("indexes")
894
  ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
895
- . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : ""), "structure")
896
  . " title='" . lang('Show structure') . "'>$name</a>"
897
  : "<span>$name</span>"
898
- ) . "<br>\n";
899
  }
 
900
  }
901
 
902
  }
110
  function login($login, $password) {
111
  global $jush;
112
  if ($jush == "sqlite") {
113
+ return lang('<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.', '<code>login()</code>');
114
  }
115
  return true;
116
  }
197
  ;
198
  }
199
 
200
+ /** Query printed in SQL command before execution
201
+ * @param string query to be executed
202
+ * @return string escaped query to be printed
203
+ */
204
+ function sqlCommandQuery($query)
205
+ {
206
+ return shorten_utf8(trim($query), 1000);
207
+ }
208
+
209
  /** Description of a row in a table
210
  * @param string
211
  * @return string SQL expression, empty string for no description
241
  function selectVal($val, $link, $field, $original) {
242
  $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
243
  if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
244
+ $return = "<i>" . lang('%d byte(s)', strlen($original)) . "</i>";
245
+ }
246
+ if (preg_match('~json~', $field["type"])) {
247
+ $return = "<code class='jush-js'>$return</code>";
248
  }
249
  return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return);
250
  }
258
  return $val;
259
  }
260
 
261
+ /** Print table structure in tabular format
262
+ * @param array data about individual fields
263
+ * @return null
264
+ */
265
+ function tableStructurePrint($fields) {
266
+ echo "<table cellspacing='0'>\n";
267
+ echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
268
+ foreach ($fields as $field) {
269
+ echo "<tr" . odd() . "><th>" . h($field["field"]);
270
+ echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
271
+ echo ($field["null"] ? " <i>NULL</i>" : "");
272
+ echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
273
+ echo (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
274
+ echo (support("comment") ? "<td>" . nbsp($field["comment"]) : "");
275
+ echo "\n";
276
+ }
277
+ echo "</table>\n";
278
+ }
279
+
280
+ /** Print list of indexes on table in tabular format
281
+ * @param array data about all indexes on a table
282
+ * @return null
283
+ */
284
+ function tableIndexesPrint($indexes) {
285
+ echo "<table cellspacing='0'>\n";
286
+ foreach ($indexes as $name => $index) {
287
+ ksort($index["columns"]); // enforce correct columns order
288
+ $print = array();
289
+ foreach ($index["columns"] as $key => $val) {
290
+ $print[] = "<i>" . h($val) . "</i>"
291
+ . ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
292
+ . ($index["descs"][$key] ? " DESC" : "")
293
+ ;
294
+ }
295
+ echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
296
+ }
297
+ echo "</table>\n";
298
+ }
299
+
300
  /** Print columns box in select
301
  * @param array result of selectColumnsProcess()[0]
302
  * @param array selectable columns
403
  echo "var indexColumns = ";
404
  $columns = array();
405
  foreach ($indexes as $index) {
406
+ $current_key = reset($index["columns"]);
407
+ if ($index["type"] != "FULLTEXT" && $current_key) {
408
+ $columns[$current_key] = 1;
409
  }
410
  }
411
  $columns[""] = 1;
858
  $connection->select_db(DB);
859
  $tables = table_status('', true);
860
  }
861
+ ?>
 
862
  <script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
863
  <script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
864
  <script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
865
+ <script type="text/javascript" src="../externals/jush/modules/jush-js.js"></script>
866
+ <?php
867
+ if (support("sql")) {
868
+ ?>
869
  <script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
870
  <script type="text/javascript">
871
  <?php
941
  * @return null
942
  */
943
  function tablesPrint($tables) {
944
+ echo "<ul id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
945
  foreach ($tables as $table => $status) {
946
+ echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
947
  $name = $this->tableName($status);
948
  echo (support("table") || support("indexes")
949
  ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
950
+ . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
951
  . " title='" . lang('Show structure') . "'>$name</a>"
952
  : "<span>$name</span>"
953
+ ) . "\n";
954
  }
955
+ echo "</ul>\n";
956
  }
957
 
958
  }
adminer/adminer/adminer/include/auth.inc.php CHANGED
@@ -120,7 +120,6 @@ function unset_permanent() {
120
  */
121
  function auth_error($error) {
122
  global $adminer, $has_token;
123
- $error = h($error);
124
  $session_name = session_name();
125
  if (isset($_GET["username"])) {
126
  header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
@@ -168,7 +167,7 @@ if (isset($_GET["username"])) {
168
  $driver = new Min_Driver($connection);
169
 
170
  if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
171
- auth_error((is_string($connection) ? $connection : (is_string($login) ? $login : lang('Invalid credentials.'))));
172
  }
173
 
174
  if ($auth && $_POST["token"]) {
120
  */
121
  function auth_error($error) {
122
  global $adminer, $has_token;
 
123
  $session_name = session_name();
124
  if (isset($_GET["username"])) {
125
  header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
167
  $driver = new Min_Driver($connection);
168
 
169
  if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
170
+ auth_error((is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))));
171
  }
172
 
173
  if ($auth && $_POST["token"]) {
adminer/adminer/adminer/include/connect.inc.php CHANGED
@@ -12,11 +12,12 @@ function connect_error() {
12
  page_header(lang('Select database'), $error, false);
13
  echo "<p class='links'>\n";
14
  foreach (array(
15
- 'database' => lang('Create new database'),
16
  'privileges' => lang('Privileges'),
17
  'processlist' => lang('Process list'),
18
  'variables' => lang('Variables'),
19
  'status' => lang('Status'),
 
20
  ) as $key => $val) {
21
  if (support($key)) {
22
  echo "<a href='" . h(ME) . "$key='>$val</a>\n";
@@ -43,8 +44,9 @@ function connect_error() {
43
 
44
  foreach ($databases as $db => $tables) {
45
  $root = h(ME) . "db=" . urlencode($db);
46
- echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : "");
47
- echo "<th><a href='$root'>" . h($db) . "</a>";
 
48
  $collation = nbsp(db_collation($db, $collations));
49
  echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
50
  echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
@@ -76,7 +78,7 @@ if (isset($_GET["import"])) {
76
  $_GET["sql"] = $_GET["import"];
77
  }
78
 
79
- if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
80
  if (DB != "" || $_GET["refresh"]) {
81
  restart_session();
82
  set_session("dbs", null);
12
  page_header(lang('Select database'), $error, false);
13
  echo "<p class='links'>\n";
14
  foreach (array(
15
+ 'database' => lang('Create database'),
16
  'privileges' => lang('Privileges'),
17
  'processlist' => lang('Process list'),
18
  'variables' => lang('Variables'),
19
  'status' => lang('Status'),
20
+ 'replication' => lang('Replication'),
21
  ) as $key => $val) {
22
  if (support($key)) {
23
  echo "<a href='" . h(ME) . "$key='>$val</a>\n";
44
 
45
  foreach ($databases as $db => $tables) {
46
  $root = h(ME) . "db=" . urlencode($db);
47
+ $id = h("Db-" . $db);
48
+ echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
49
+ echo "<th><a href='$root' id='$db'>" . h($db) . "</a>";
50
  $collation = nbsp(db_collation($db, $collations));
51
  echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
52
  echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
78
  $_GET["sql"] = $_GET["import"];
79
  }
80
 
81
+ if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["replication"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
82
  if (DB != "" || $_GET["refresh"]) {
83
  restart_session();
84
  set_session("dbs", null);
adminer/adminer/adminer/include/editing.inc.php CHANGED
@@ -141,7 +141,7 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
141
  global $structured_types, $types, $unsigned, $on_actions;
142
  $type = $field["type"];
143
  ?>
144
- <td><select name="<?php echo h($key); ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"<?php echo on_help("getTarget(event).value", 1); ?>><?php
145
  if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
146
  array_unshift($structured_types, $type);
147
  }
@@ -150,7 +150,7 @@ if ($foreign_keys) {
150
  }
151
  echo optionlist($structured_types, $type);
152
  ?></select>
153
- <td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();"><td class="options"><?php //! type="number" with enabled JavaScript
154
  echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
155
  echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
156
  echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), $field["on_update"]) . '</select>' : '');
@@ -238,20 +238,20 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
238
  ?>
239
  <thead><tr class="wrap">
240
  <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
241
- <th><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
242
- <td><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
243
- <td><?php echo lang('Length'); ?>
244
- <td><?php echo lang('Options'); ?>
245
  <?php if ($type == "TABLE") { ?>
246
- <td>NULL
247
- <td><input type="radio" name="auto_increment_col" value=""><acronym title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array(
248
  'sql' => "example-auto-increment.html",
249
  'sqlite' => "autoinc.html",
250
  'pgsql' => "datatype.html#DATATYPE-SERIAL",
251
  'mssql' => "ms186775.aspx",
252
  )); ?>
253
- <td><?php echo lang('Default value'); ?>
254
- <?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
255
  <?php } ?>
256
  <td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
257
  </thead>
@@ -264,21 +264,21 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
264
  ?>
265
  <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
266
  <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
267
- <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off"><?php } ?>
268
  <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
269
  <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
270
  <?php if ($type == "TABLE") { ?>
271
- <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block"); ?>
272
- <td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }"></label><td><?php
273
- echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;">
274
- <?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . ($connection->server_info >= 5.5 ? 1024 : 255) . "'>" : ""); ?>
275
  <?php } ?>
276
  <?php
277
  echo "<td>";
278
  echo (support("move_col") ?
279
  "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;"
280
- . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;"
281
- . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;"
282
  : "");
283
  echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">" : "");
284
  echo "\n";
@@ -290,7 +290,6 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input nam
290
  * @return bool
291
  */
292
  function process_fields(&$fields) {
293
- ksort($fields);
294
  $offset = 0;
295
  if ($_POST["up"]) {
296
  $last = 0;
@@ -432,9 +431,9 @@ function create_routine($routine, $row) {
432
  }
433
 
434
  /** Remove current user definer from SQL command
435
- * @param string
436
- * @return string
437
- */
438
  function remove_definer($query) {
439
  return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
440
  }
141
  global $structured_types, $types, $unsigned, $on_actions;
142
  $type = $field["type"];
143
  ?>
144
+ <td><select name="<?php echo h($key); ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"<?php echo on_help("getTarget(event).value", 1); ?> aria-labelledby="label-type"><?php
145
  if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
146
  array_unshift($structured_types, $type);
147
  }
150
  }
151
  echo optionlist($structured_types, $type);
152
  ?></select>
153
+ <td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();" aria-labelledby="label-length"><td class="options"><?php //! type="number" with enabled JavaScript
154
  echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
155
  echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
156
  echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), $field["on_update"]) . '</select>' : '');
238
  ?>
239
  <thead><tr class="wrap">
240
  <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
241
+ <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
242
+ <td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
243
+ <td id="label-length"><?php echo lang('Length'); ?>
244
+ <td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
245
  <?php if ($type == "TABLE") { ?>
246
+ <td id="label-null">NULL
247
+ <td><input type="radio" name="auto_increment_col" value=""><acronym id="label-ai" title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array(
248
  'sql' => "example-auto-increment.html",
249
  'sqlite' => "autoinc.html",
250
  'pgsql' => "datatype.html#DATATYPE-SERIAL",
251
  'mssql' => "ms186775.aspx",
252
  )); ?>
253
+ <td id="label-default"><?php echo lang('Default value'); ?>
254
+ <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
255
  <?php } ?>
256
  <td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
257
  </thead>
264
  ?>
265
  <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
266
  <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
267
+ <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
268
  <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
269
  <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
270
  <?php if ($type == "TABLE") { ?>
271
+ <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
272
+ <td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }" aria-labelledby="label-ai"></label><td><?php
273
+ echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;" aria-labelledby="label-default">
274
+ <?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . ($connection->server_info >= 5.5 ? 1024 : 255) . "' aria-labelledby='label-comment'>" : ""); ?>
275
  <?php } ?>
276
  <?php
277
  echo "<td>";
278
  echo (support("move_col") ?
279
  "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;"
280
+ . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "' onclick='return !editingMoveRow(this, 1);'>&nbsp;"
281
+ . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "' onclick='return !editingMoveRow(this, 0);'>&nbsp;"
282
  : "");
283
  echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">" : "");
284
  echo "\n";
290
  * @return bool
291
  */
292
  function process_fields(&$fields) {
 
293
  $offset = 0;
294
  if ($_POST["up"]) {
295
  $last = 0;
431
  }
432
 
433
  /** Remove current user definer from SQL command
434
+ * @param string
435
+ * @return string
436
+ */
437
  function remove_definer($query) {
438
  return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
439
  }
adminer/adminer/adminer/include/functions.inc.php CHANGED
@@ -69,7 +69,7 @@ function remove_slashes($process, $filter = false) {
69
  */
70
  function bracket_escape($idf, $back = false) {
71
  // escape brackets inside name="x[]"
72
- static $trans = array(':' => ':1', ']' => ':2', '[' => ':3');
73
  return strtr($idf, ($back ? array_flip($trans) : $trans));
74
  }
75
 
@@ -112,11 +112,13 @@ function nl_br($string) {
112
  * @param string
113
  * @param string
114
  * @param string
 
115
  * @return string
116
  */
117
- function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "") {
118
  $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
119
  . ($checked ? " checked" : "")
 
120
  . ($onclick ? ' onclick="' . h($onclick) . '"' : '')
121
  . ">"
122
  ;
@@ -152,11 +154,15 @@ function optionlist($options, $selected = null, $use_keys = false) {
152
  * @param array
153
  * @param string
154
  * @param string true for no onchange, false for radio
 
155
  * @return string
156
  */
157
- function html_select($name, $options, $value = "", $onchange = true) {
158
  if ($onchange) {
159
- return "<select name='" . h($name) . "'" . (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "") . ">" . optionlist($options, $value) . "</select>";
 
 
 
160
  }
161
  $return = "";
162
  foreach ($options as $key => $val) {
@@ -237,7 +243,7 @@ function json_row($key, $val = null) {
237
  echo "{";
238
  }
239
  if ($key != "") {
240
- echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'undefined');
241
  $first = false;
242
  } else {
243
  echo "\n}\n";
@@ -406,10 +412,10 @@ function where($where, $fields = array()) {
406
  $key = bracket_escape($key, 1); // 1 - back
407
  $column = escape_key($key);
408
  $return[] = $column
409
- . (($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val)) || $jush == "mssql"
410
- ? " LIKE " . q(addcslashes($val, "%_\\"))
411
  : " = " . unconvert_field($fields[$key], q($val))
412
- ) // LIKE because of floats but slow with ints, in MS SQL because of text
413
  ; //! enum and set
414
  if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
415
  $return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
@@ -471,18 +477,12 @@ function convert_fields($columns, $fields, $select = array()) {
471
  */
472
  function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days
473
  global $HTTPS;
474
- $params = array(
475
- $name,
476
- (preg_match("~\n~", $value) ? "" : $value), // HTTP Response Splitting protection in PHP < 5.1.2
477
- ($lifetime ? time() + $lifetime : 0),
478
- preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]),
479
- "",
480
- $HTTPS
481
  );
482
- if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
483
- $params[] = true; // HttpOnly
484
- }
485
- return call_user_func_array('setcookie', $params);
486
  }
487
 
488
  /** Restart stopped session
@@ -744,7 +744,7 @@ function is_utf8($val) {
744
  * @return string escaped string with appended ...
745
  */
746
  function shorten_utf8($string, $length = 80, $suffix = "") {
747
- if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow
748
  preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match);
749
  }
750
  return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>");
@@ -884,6 +884,9 @@ function input($field, $value, $function) {
884
  $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
885
  if ($input != "") {
886
  echo $input;
 
 
 
887
  } elseif ($field["type"] == "set") { //! 64 bits
888
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
889
  foreach ($matches[1] as $i => $val) {
@@ -901,7 +904,7 @@ function input($field, $value, $function) {
901
  $attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
902
  }
903
  echo "<textarea$attrs>" . h($value) . '</textarea>';
904
- } elseif ($function == "json") {
905
  echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
906
  } else {
907
  // int(3) is only a display hint
@@ -911,8 +914,8 @@ function input($field, $value, $function) {
911
  }
912
  // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
913
  echo "<input"
914
- . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "")
915
- . " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "")
916
  . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
917
  . "$attrs>"
918
  ;
@@ -1135,7 +1138,7 @@ function select_value($val, $link, $field, $text_length) {
1135
  $link = "mailto:$val";
1136
  }
1137
  if ($protocol = is_url($val)) {
1138
- $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009
1139
  ? $val // HTTP links from HTTPS pages don't receive Referer automatically
1140
  : "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
1141
  );
@@ -1181,7 +1184,7 @@ function is_url($string) {
1181
  * @return bool
1182
  */
1183
  function is_shortable($field) {
1184
- return preg_match('~char|text|lob|geometry|point|linestring|polygon|string~', $field["type"]);
1185
  }
1186
 
1187
  /** Get query to compute number of found rows
@@ -1209,7 +1212,7 @@ function slow_query($query) {
1209
  $db = $adminer->database();
1210
  $timeout = $adminer->queryTimeout();
1211
  if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
1212
- $kill = $connection2->result("SELECT CONNECTION_ID()"); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
1213
  ?>
1214
  <script type="text/javascript">
1215
  var timeout = setTimeout(function () {
69
  */
70
  function bracket_escape($idf, $back = false) {
71
  // escape brackets inside name="x[]"
72
+ static $trans = array(':' => ':1', ']' => ':2', '[' => ':3', '"' => ':4');
73
  return strtr($idf, ($back ? array_flip($trans) : $trans));
74
  }
75
 
112
  * @param string
113
  * @param string
114
  * @param string
115
+ * @param string
116
  * @return string
117
  */
118
+ function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "", $labelled_by = "") {
119
  $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
120
  . ($checked ? " checked" : "")
121
+ . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
122
  . ($onclick ? ' onclick="' . h($onclick) . '"' : '')
123
  . ">"
124
  ;
154
  * @param array
155
  * @param string
156
  * @param string true for no onchange, false for radio
157
+ * @param string
158
  * @return string
159
  */
160
+ function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
161
  if ($onchange) {
162
+ return "<select name='" . h($name) . "'"
163
+ . (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "")
164
+ . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
165
+ . ">" . optionlist($options, $value) . "</select>";
166
  }
167
  $return = "";
168
  foreach ($options as $key => $val) {
243
  echo "{";
244
  }
245
  if ($key != "") {
246
+ echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
247
  $first = false;
248
  } else {
249
  echo "\n}\n";
412
  $key = bracket_escape($key, 1); // 1 - back
413
  $column = escape_key($key);
414
  $return[] = $column
415
+ . ($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val) ? " LIKE " . q(addcslashes($val, "%_\\"))
416
+ : ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val))
417
  : " = " . unconvert_field($fields[$key], q($val))
418
+ )) // LIKE because of floats but slow with ints, in MS SQL because of text
419
  ; //! enum and set
420
  if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
421
  $return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
477
  */
478
  function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days
479
  global $HTTPS;
480
+ return header("Set-Cookie: $name=" . urlencode($value)
481
+ . ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
482
+ . "; path=" . preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])
483
+ . ($HTTPS ? "; secure" : "")
484
+ . "; HttpOnly; SameSite=lax"
 
 
485
  );
 
 
 
 
486
  }
487
 
488
  /** Restart stopped session
744
  * @return string escaped string with appended ...
745
  */
746
  function shorten_utf8($string, $length = 80, $suffix = "") {
747
+ if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{10FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow
748
  preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match);
749
  }
750
  return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>");
884
  $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
885
  if ($input != "") {
886
  echo $input;
887
+ } elseif (preg_match('~bool~', $field["type"])) {
888
+ echo "<input type='hidden'$attrs value='0'>" .
889
+ "<input type='checkbox'" . (in_array(strtolower($value), array('1', 't', 'true', 'y', 'yes', 'on')) ? " checked='checked'" : "") . "$attrs value='1'>";
890
  } elseif ($field["type"] == "set") { //! 64 bits
891
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
892
  foreach ($matches[1] as $i => $val) {
904
  $attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
905
  }
906
  echo "<textarea$attrs>" . h($value) . '</textarea>';
907
+ } elseif ($function == "json" || preg_match('~^jsonb?$~', $field["type"])) {
908
  echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
909
  } else {
910
  // int(3) is only a display hint
914
  }
915
  // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
916
  echo "<input"
917
+ . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
918
+ . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
919
  . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
920
  . "$attrs>"
921
  ;
1138
  $link = "mailto:$val";
1139
  }
1140
  if ($protocol = is_url($val)) {
1141
+ $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit|Firefox~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009, Firefox since version 38
1142
  ? $val // HTTP links from HTTPS pages don't receive Referer automatically
1143
  : "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
1144
  );
1184
  * @return bool
1185
  */
1186
  function is_shortable($field) {
1187
+ return preg_match('~char|text|lob|geometry|point|linestring|polygon|string|bytea~', $field["type"]);
1188
  }
1189
 
1190
  /** Get query to compute number of found rows
1212
  $db = $adminer->database();
1213
  $timeout = $adminer->queryTimeout();
1214
  if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
1215
+ $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
1216
  ?>
1217
  <script type="text/javascript">
1218
  var timeout = setTimeout(function () {
adminer/adminer/adminer/include/pdo.inc.php CHANGED
@@ -16,10 +16,10 @@ if (extension_loaded('pdo')) {
16
  try {
17
  parent::__construct($dsn, $username, $password);
18
  } catch (Exception $ex) {
19
- auth_error($ex->getMessage());
20
  }
21
  $this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
22
- $this->server_info = $this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
23
  }
24
 
25
  /*abstract function select_db($database);*/
16
  try {
17
  parent::__construct($dsn, $username, $password);
18
  } catch (Exception $ex) {
19
+ auth_error(h($ex->getMessage()));
20
  }
21
  $this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
22
+ $this->server_info = @$this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
23
  }
24
 
25
  /*abstract function select_db($database);*/
adminer/adminer/adminer/include/version.inc.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- $VERSION = "4.2.5";
1
  <?php
2
+ $VERSION = "4.3.0";
adminer/adminer/adminer/index.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /** Adminer - Compact database management
3
  * @link https://www.adminer.org/
4
- * @author Jakub Vrana, http://www.vrana.cz/
5
  * @copyright 2007 Jakub Vrana
6
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
  * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
@@ -65,6 +65,8 @@ if (isset($_GET["download"])) {
65
  include "./user.inc.php";
66
  } elseif (isset($_GET["processlist"])) {
67
  include "./processlist.inc.php";
 
 
68
  } elseif (isset($_GET["select"])) {
69
  include "./select.inc.php";
70
  } elseif (isset($_GET["variables"])) {
1
  <?php
2
  /** Adminer - Compact database management
3
  * @link https://www.adminer.org/
4
+ * @author Jakub Vrana, https://www.vrana.cz/
5
  * @copyright 2007 Jakub Vrana
6
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
  * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
65
  include "./user.inc.php";
66
  } elseif (isset($_GET["processlist"])) {
67
  include "./processlist.inc.php";
68
+ } elseif (isset($_GET["replication"])) {
69
+ include "./replication.inc.php";
70
  } elseif (isset($_GET["select"])) {
71
  include "./select.inc.php";
72
  } elseif (isset($_GET["variables"])) {
adminer/adminer/adminer/indexes.inc.php CHANGED
@@ -5,6 +5,9 @@ $table_status = table_status($TABLE, true);
5
  if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
6
  $index_types[] = "FULLTEXT";
7
  }
 
 
 
8
  $indexes = indexes($TABLE);
9
  $primary = array();
10
  if ($jush == "mongo") { // doesn't support primary key
@@ -93,9 +96,9 @@ if (!$row) {
93
  <form action="" method="post">
94
  <table cellspacing="0" class="nowrap">
95
  <thead><tr>
96
- <th><?php echo lang('Index Type'); ?>
97
- <th><input type="submit" style="left: -1000px; position: absolute;"><?php echo lang('Column (length)'); ?>
98
- <th><?php echo lang('Name'); ?>
99
  <th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
100
  </thead>
101
  <?php
@@ -110,24 +113,24 @@ if ($primary) {
110
  $j = 1;
111
  foreach ($row["indexes"] as $index) {
112
  if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
113
- echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1));
114
 
115
  echo "<td>";
116
  ksort($index["columns"]);
117
  $i = 1;
118
  foreach ($index["columns"] as $key => $column) {
119
  echo "<span>" . select_input(
120
- " name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . h(js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_")) . "');\"",
121
  ($fields ? array_combine($fields, $fields) : $fields),
122
  $column
123
  );
124
- echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "'>" : "");
125
  echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
126
  echo " </span>";
127
  $i++;
128
  }
129
 
130
- echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off'>\n";
131
  echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n";
132
  }
133
  $j++;
5
  if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
6
  $index_types[] = "FULLTEXT";
7
  }
8
+ if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.7 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
9
+ $index_types[] = "SPATIAL";
10
+ }
11
  $indexes = indexes($TABLE);
12
  $primary = array();
13
  if ($jush == "mongo") { // doesn't support primary key
96
  <form action="" method="post">
97
  <table cellspacing="0" class="nowrap">
98
  <thead><tr>
99
+ <th id="label-type"><?php echo lang('Index Type'); ?>
100
+ <th><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
101
+ <th id="label-name"><?php echo lang('Name'); ?>
102
  <th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
103
  </thead>
104
  <?php
113
  $j = 1;
114
  foreach ($row["indexes"] as $index) {
115
  if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
116
+ echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1), "label-type");
117
 
118
  echo "<td>";
119
  ksort($index["columns"]);
120
  $i = 1;
121
  foreach ($index["columns"] as $key => $column) {
122
  echo "<span>" . select_input(
123
+ " name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . h(js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_")) . "');\" title='" . lang('Column') . "'",
124
  ($fields ? array_combine($fields, $fields) : $fields),
125
  $column
126
  );
127
+ echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
128
  echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
129
  echo " </span>";
130
  $i++;
131
  }
132
 
133
+ echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
134
  echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n";
135
  }
136
  $j++;
adminer/adminer/adminer/lang/ar.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'كلمة المرور',
9
  'Select database' => 'اختر قاعدة البيانات',
10
  'Invalid database.' => 'قاعدة البيانات غير صالحة.',
11
- 'Create new database' => 'أنشئ فاعدة بيانات جديدة',
12
  'Table has been dropped.' => 'تم حذف الجدول.',
13
  'Table has been altered.' => 'تم تعديل الجدول.',
14
  'Table has been created.' => 'تم إنشاء الجدول.',
8
  'Password' => 'كلمة المرور',
9
  'Select database' => 'اختر قاعدة البيانات',
10
  'Invalid database.' => 'قاعدة البيانات غير صالحة.',
 
11
  'Table has been dropped.' => 'تم حذف الجدول.',
12
  'Table has been altered.' => 'تم تعديل الجدول.',
13
  'Table has been created.' => 'تم إنشاء الجدول.',
adminer/adminer/adminer/lang/bg.inc.php CHANGED
@@ -82,7 +82,6 @@ $translations = array(
82
  'Use' => 'Избор',
83
  'Select database' => 'Избор на база данни',
84
  'Invalid database.' => 'Невалидна база данни.',
85
- 'Create new database' => 'Нова база данни',
86
  'Database has been dropped.' => 'Базата данни беше премахната.',
87
  'Databases have been dropped.' => 'Базите данни бяха премехнати.',
88
  'Database has been created.' => 'Базата данни беше създадена.',
@@ -182,13 +181,12 @@ $translations = array(
182
  'Values' => 'Стойности',
183
 
184
  'View' => 'Изглед',
185
- 'Materialized View' => 'Запаметен изглед',
186
  'View has been dropped.' => 'Изгледа беше премахнат.',
187
  'View has been altered.' => 'Изгледа беше променен.',
188
  'View has been created.' => 'Изгледа беше създаден.',
189
  'Alter view' => 'Промяна на изглед',
190
  'Create view' => 'Създаване на изглед',
191
- 'Create materialized view' => 'Създаване на запаметен изглед',
192
 
193
  'Indexes' => 'Индекси',
194
  'Indexes have been altered.' => 'Индексите бяха променени.',
82
  'Use' => 'Избор',
83
  'Select database' => 'Избор на база данни',
84
  'Invalid database.' => 'Невалидна база данни.',
 
85
  'Database has been dropped.' => 'Базата данни беше премахната.',
86
  'Databases have been dropped.' => 'Базите данни бяха премехнати.',
87
  'Database has been created.' => 'Базата данни беше създадена.',
181
  'Values' => 'Стойности',
182
 
183
  'View' => 'Изглед',
184
+ 'Materialized view' => 'Запаметен изглед',
185
  'View has been dropped.' => 'Изгледа беше премахнат.',
186
  'View has been altered.' => 'Изгледа беше променен.',
187
  'View has been created.' => 'Изгледа беше създаден.',
188
  'Alter view' => 'Промяна на изглед',
189
  'Create view' => 'Създаване на изглед',
 
190
 
191
  'Indexes' => 'Индекси',
192
  'Indexes have been altered.' => 'Индексите бяха променени.',
adminer/adminer/adminer/lang/bn.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'পাসওয়ার্ড',
9
  'Select database' => 'ডাটাবেজ নির্বাচন করো',
10
  'Invalid database.' => 'ভুল ডাটাবেজ।',
11
- 'Create new database' => 'নতুন ডাটাবেজ তৈরী করো',
12
  'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।',
13
  'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।',
14
  'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।',
8
  'Password' => 'পাসওয়ার্ড',
9
  'Select database' => 'ডাটাবেজ নির্বাচন করো',
10
  'Invalid database.' => 'ভুল ডাটাবেজ।',
 
11
  'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।',
12
  'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।',
13
  'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।',
adminer/adminer/adminer/lang/bs.inc.php CHANGED
@@ -77,7 +77,6 @@ $translations = array(
77
  'Use' => 'Koristi',
78
  'Select database' => 'Izaberite bazu',
79
  'Invalid database.' => 'Neispravna baza podataka.',
80
- 'Create new database' => 'Napravi novu bazu podataka',
81
  'Database has been dropped.' => 'Baza podataka je izbrisana.',
82
  'Databases have been dropped.' => 'Baze podataka su izbrisane.',
83
  'Database has been created.' => 'Baza podataka je spašena.',
77
  'Use' => 'Koristi',
78
  'Select database' => 'Izaberite bazu',
79
  'Invalid database.' => 'Neispravna baza podataka.',
 
80
  'Database has been dropped.' => 'Baza podataka je izbrisana.',
81
  'Databases have been dropped.' => 'Baze podataka su izbrisane.',
82
  'Database has been created.' => 'Baza podataka je spašena.',
adminer/adminer/adminer/lang/ca.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Contrasenya',
9
  'Select database' => 'Selecciona base de dades',
10
  'Invalid database.' => 'Base de dades invàlida.',
11
- 'Create new database' => 'Crea una nova base de dades',
12
  'Table has been dropped.' => 'S\'ha suprimit la taula.',
13
  'Table has been altered.' => 'S\'ha modificat la taula.',
14
  'Table has been created.' => 'S\'ha creat la taula.',
8
  'Password' => 'Contrasenya',
9
  'Select database' => 'Selecciona base de dades',
10
  'Invalid database.' => 'Base de dades invàlida.',
 
11
  'Table has been dropped.' => 'S\'ha suprimit la taula.',
12
  'Table has been altered.' => 'S\'ha modificat la taula.',
13
  'Table has been created.' => 'S\'ha creat la taula.',
adminer/adminer/adminer/lang/cs.inc.php CHANGED
@@ -11,7 +11,7 @@ $translations = array(
11
  'Logged as: %s' => 'Přihlášen jako: %s',
12
  'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
13
  'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
14
- 'Implement %s method to use SQLite.' => 'Pro přihlášení k SQLite implementujte metodu %s.',
15
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'),
16
  'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/" target="_blank">Implementujte</a> metodu %s, aby platilo stále.',
17
  'Language' => 'Jazyk',
@@ -45,6 +45,10 @@ $translations = array(
45
  'Variables' => 'Proměnné',
46
  'Status' => 'Stav',
47
 
 
 
 
 
48
  'SQL command' => 'SQL příkaz',
49
  '%d query(s) executed OK.' => array('%d příkaz proběhl v pořádku.', '%d příkazy proběhly v pořádku.', '%d příkazů proběhlo v pořádku.'),
50
  'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'),
@@ -84,7 +88,6 @@ $translations = array(
84
  'Use' => 'Vybrat',
85
  'Select database' => 'Vybrat databázi',
86
  'Invalid database.' => 'Nesprávná databáze.',
87
- 'Create new database' => 'Vytvořit novou databázi',
88
  'Database has been dropped.' => 'Databáze byla odstraněna.',
89
  'Databases have been dropped.' => 'Databáze byly odstraněny.',
90
  'Database has been created.' => 'Databáze byla vytvořena.',
@@ -184,13 +187,12 @@ $translations = array(
184
  'Values' => 'Hodnoty',
185
 
186
  'View' => 'Pohled',
187
- 'Materialized View' => 'Materializovaný pohled',
188
  'View has been dropped.' => 'Pohled byl odstraněn.',
189
  'View has been altered.' => 'Pohled byl změněn.',
190
  'View has been created.' => 'Pohled byl vytvořen.',
191
  'Alter view' => 'Pozměnit pohled',
192
  'Create view' => 'Vytvořit pohled',
193
- 'Create materialized view' => 'Vytvořit materializovaný pohled',
194
 
195
  'Indexes' => 'Indexy',
196
  'Indexes have been altered.' => 'Indexy byly změněny.',
@@ -337,4 +339,8 @@ $translations = array(
337
  'Type has been dropped.' => 'Typ byl odstraněn.',
338
  'Type has been created.' => 'Typ byl vytvořen.',
339
  'Alter type' => 'Pozměnit typ',
 
 
 
 
340
  );
11
  'Logged as: %s' => 'Přihlášen jako: %s',
12
  'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
13
  'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
14
+ '<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.' => 'Pro přihlášení k SQLite <a href="https://www.adminer.org/cs/extension/" target="_blank">implementujte</a> metodu %s.',
15
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'),
16
  'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/" target="_blank">Implementujte</a> metodu %s, aby platilo stále.',
17
  'Language' => 'Jazyk',
45
  'Variables' => 'Proměnné',
46
  'Status' => 'Stav',
47
 
48
+ 'Replication' => 'Replikace',
49
+ 'Master status' => 'Master status',
50
+ 'Slave status' => 'Slave status',
51
+
52
  'SQL command' => 'SQL příkaz',
53
  '%d query(s) executed OK.' => array('%d příkaz proběhl v pořádku.', '%d příkazy proběhly v pořádku.', '%d příkazů proběhlo v pořádku.'),
54
  'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'),
88
  'Use' => 'Vybrat',
89
  'Select database' => 'Vybrat databázi',
90
  'Invalid database.' => 'Nesprávná databáze.',
 
91
  'Database has been dropped.' => 'Databáze byla odstraněna.',
92
  'Databases have been dropped.' => 'Databáze byly odstraněny.',
93
  'Database has been created.' => 'Databáze byla vytvořena.',
187
  'Values' => 'Hodnoty',
188
 
189
  'View' => 'Pohled',
190
+ 'Materialized view' => 'Materializovaný pohled',
191
  'View has been dropped.' => 'Pohled byl odstraněn.',
192
  'View has been altered.' => 'Pohled byl změněn.',
193
  'View has been created.' => 'Pohled byl vytvořen.',
194
  'Alter view' => 'Pozměnit pohled',
195
  'Create view' => 'Vytvořit pohled',
 
196
 
197
  'Indexes' => 'Indexy',
198
  'Indexes have been altered.' => 'Indexy byly změněny.',
339
  'Type has been dropped.' => 'Typ byl odstraněn.',
340
  'Type has been created.' => 'Typ byl vytvořen.',
341
  'Alter type' => 'Pozměnit typ',
342
+
343
+ 'Replication' => null,
344
+ 'Master status' => null,
345
+ 'Slave status' => null,
346
  );
adminer/adminer/adminer/lang/da.inc.php CHANGED
@@ -68,7 +68,6 @@ $translations = array(
68
  'Use' => 'Brug',
69
  'Select database' => 'Vælg database',
70
  'Invalid database.' => 'Ugyldig database.',
71
- 'Create new database' => 'Opret ny database',
72
  'Database has been dropped.' => 'Databasen er blevet slettet.',
73
  'Databases have been dropped.' => 'Databasene er blevet slettet.',
74
  'Database has been created.' => 'Databasen er oprettet.',
68
  'Use' => 'Brug',
69
  'Select database' => 'Vælg database',
70
  'Invalid database.' => 'Ugyldig database.',
 
71
  'Database has been dropped.' => 'Databasen er blevet slettet.',
72
  'Databases have been dropped.' => 'Databasene er blevet slettet.',
73
  'Database has been created.' => 'Databasen er oprettet.',
adminer/adminer/adminer/lang/de.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Passwort',
9
  'Select database' => 'Datenbank auswählen',
10
  'Invalid database.' => 'Datenbank ungültig.',
11
- 'Create new database' => 'Datenbank erstellen',
12
  'Table has been dropped.' => 'Tabelle wurde entfernt.',
13
  'Table has been altered.' => 'Tabelle wurde geändert.',
14
  'Table has been created.' => 'Tabelle wurde erstellt.',
8
  'Password' => 'Passwort',
9
  'Select database' => 'Datenbank auswählen',
10
  'Invalid database.' => 'Datenbank ungültig.',
 
11
  'Table has been dropped.' => 'Tabelle wurde entfernt.',
12
  'Table has been altered.' => 'Tabelle wurde geändert.',
13
  'Table has been created.' => 'Tabelle wurde erstellt.',
adminer/adminer/adminer/lang/el.inc.php CHANGED
@@ -83,7 +83,6 @@ $translations = array(
83
  'Use' => 'χρήση',
84
  'Select database' => 'Επιλέξτε Β.Δ.',
85
  'Invalid database.' => 'Άκυρη Β.Δ.',
86
- 'Create new database' => 'Δημιουργία νέας Β.Δ.',
87
  'Database has been dropped.' => 'Η Β.Δ. διαγράφηκε.',
88
  'Databases have been dropped.' => 'Οι Β.Δ. διαγράφηκαν.',
89
  'Database has been created.' => 'Η Β.Δ. δημιουργήθηκε.',
@@ -183,13 +182,12 @@ $translations = array(
183
  'Values' => 'Τιμές',
184
 
185
  'View' => 'Προβολή',
186
- 'Materialized View' => 'Υλοποιημένη Προβολή',
187
  'View has been dropped.' => 'Η προβολή διαγράφηκε.',
188
  'View has been altered.' => 'Η προβολή τροποποιήθηκε.',
189
  'View has been created.' => 'Η προβολή δημιουργήθηκε.',
190
  'Alter view' => 'Τροποποίηση προβολής',
191
  'Create view' => 'Δημιουργία προβολής',
192
- 'Create materialized view' => 'Δημιουργία Υλοποιημένης προβολής',
193
 
194
  'Indexes' => 'Δείκτες',
195
  'Indexes have been altered.' => 'Οι δείκτες τροποποιήθηκαν.',
83
  'Use' => 'χρήση',
84
  'Select database' => 'Επιλέξτε Β.Δ.',
85
  'Invalid database.' => 'Άκυρη Β.Δ.',
 
86
  'Database has been dropped.' => 'Η Β.Δ. διαγράφηκε.',
87
  'Databases have been dropped.' => 'Οι Β.Δ. διαγράφηκαν.',
88
  'Database has been created.' => 'Η Β.Δ. δημιουργήθηκε.',
182
  'Values' => 'Τιμές',
183
 
184
  'View' => 'Προβολή',
185
+ 'Materialized view' => 'Υλοποιημένη προβολή',
186
  'View has been dropped.' => 'Η προβολή διαγράφηκε.',
187
  'View has been altered.' => 'Η προβολή τροποποιήθηκε.',
188
  'View has been created.' => 'Η προβολή δημιουργήθηκε.',
189
  'Alter view' => 'Τροποποίηση προβολής',
190
  'Create view' => 'Δημιουργία προβολής',
 
191
 
192
  'Indexes' => 'Δείκτες',
193
  'Indexes have been altered.' => 'Οι δείκτες τροποποιήθηκαν.',
adminer/adminer/adminer/lang/es.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Contraseña',
9
  'Select database' => 'Seleccionar Base de datos',
10
  'Invalid database.' => 'Base de datos incorrecta.',
11
- 'Create new database' => 'Crear nueva base de datos',
12
  'Table has been dropped.' => 'Tabla eliminada.',
13
  'Table has been altered.' => 'Tabla modificada.',
14
  'Table has been created.' => 'Tabla creada.',
8
  'Password' => 'Contraseña',
9
  'Select database' => 'Seleccionar Base de datos',
10
  'Invalid database.' => 'Base de datos incorrecta.',
 
11
  'Table has been dropped.' => 'Tabla eliminada.',
12
  'Table has been altered.' => 'Tabla modificada.',
13
  'Table has been created.' => 'Tabla creada.',
adminer/adminer/adminer/lang/et.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Parool',
9
  'Select database' => 'Vali andmebaas',
10
  'Invalid database.' => 'Tundmatu andmebaas.',
11
- 'Create new database' => 'Loo uus andmebaas',
12
  'Table has been dropped.' => 'Tabel on edukalt kustutatud.',
13
  'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
14
  'Table has been created.' => 'Tabel on edukalt loodud.',
8
  'Password' => 'Parool',
9
  'Select database' => 'Vali andmebaas',
10
  'Invalid database.' => 'Tundmatu andmebaas.',
 
11
  'Table has been dropped.' => 'Tabel on edukalt kustutatud.',
12
  'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
13
  'Table has been created.' => 'Tabel on edukalt loodud.',
adminer/adminer/adminer/lang/fa.inc.php CHANGED
@@ -81,7 +81,6 @@ $translations = array(
81
  'Use' => 'استفاده',
82
  'Select database' => 'انتخاب پایگاه داده',
83
  'Invalid database.' => 'پایگاه داده نامعتبر.',
84
- 'Create new database' => 'ایجاد پایگاه داده جدید',
85
  'Database has been dropped.' => 'پایگاه داده حذف شد.',
86
  'Databases have been dropped.' => 'پایگاه های داده حذف شدند.',
87
  'Database has been created.' => 'پایگاه داده ایجاد شد.',
@@ -181,13 +180,12 @@ $translations = array(
181
  'Values' => 'مقادیر',
182
 
183
  'View' => 'نمایش',
184
- 'Materialized View' => 'نمایه مادی',
185
  'View has been dropped.' => 'نمایش حذف شد.',
186
  'View has been altered.' => 'نمایش ویرایش شد.',
187
  'View has been created.' => 'نمایش ایجاد شد.',
188
  'Alter view' => 'حذف نمایش',
189
  'Create view' => 'ایجاد نمایش',
190
- 'Create materialized view' => 'ایجاد نمایه مادی',
191
 
192
  'Indexes' => 'ایندکسها',
193
  'Indexes have been altered.' => 'ایندکسها ویرایش شدند.',
81
  'Use' => 'استفاده',
82
  'Select database' => 'انتخاب پایگاه داده',
83
  'Invalid database.' => 'پایگاه داده نامعتبر.',
 
84
  'Database has been dropped.' => 'پایگاه داده حذف شد.',
85
  'Databases have been dropped.' => 'پایگاه های داده حذف شدند.',
86
  'Database has been created.' => 'پایگاه داده ایجاد شد.',
180
  'Values' => 'مقادیر',
181
 
182
  'View' => 'نمایش',
183
+ 'Materialized view' => 'نمایه مادی',
184
  'View has been dropped.' => 'نمایش حذف شد.',
185
  'View has been altered.' => 'نمایش ویرایش شد.',
186
  'View has been created.' => 'نمایش ایجاد شد.',
187
  'Alter view' => 'حذف نمایش',
188
  'Create view' => 'ایجاد نمایش',
 
189
 
190
  'Indexes' => 'ایندکسها',
191
  'Indexes have been altered.' => 'ایندکسها ویرایش شدند.',
adminer/adminer/adminer/lang/fi.inc.php CHANGED
@@ -83,7 +83,6 @@ $translations = array(
83
  'Use' => 'Käytä',
84
  'Select database' => 'Valitse tietokanta',
85
  'Invalid database.' => 'Tietokanta ei kelpaa.',
86
- 'Create new database' => 'Luo uusi tietokanta',
87
  'Database has been dropped.' => 'Tietokanta on poistettu.',
88
  'Databases have been dropped.' => 'Tietokannat on poistettu.',
89
  'Database has been created.' => 'Tietokanta on luotu.',
@@ -183,13 +182,12 @@ $translations = array(
183
  'Values' => 'Arvot',
184
 
185
  'View' => 'Näkymä',
186
- 'Materialized View' => 'Materialisoitunut näkymä',
187
  'View has been dropped.' => 'Näkymä on poistettu.',
188
  'View has been altered.' => 'Näkymää on muutettu.',
189
  'View has been created.' => 'Näkymä on luotu.',
190
  'Alter view' => 'Muuta näkymää',
191
  'Create view' => 'Luo näkymä',
192
- 'Create materialized view' => 'Luo materialisoitunut näkymä',
193
 
194
  'Indexes' => 'Indeksit',
195
  'Indexes have been altered.' => 'Indeksejä on muutettu.',
83
  'Use' => 'Käytä',
84
  'Select database' => 'Valitse tietokanta',
85
  'Invalid database.' => 'Tietokanta ei kelpaa.',
 
86
  'Database has been dropped.' => 'Tietokanta on poistettu.',
87
  'Databases have been dropped.' => 'Tietokannat on poistettu.',
88
  'Database has been created.' => 'Tietokanta on luotu.',
182
  'Values' => 'Arvot',
183
 
184
  'View' => 'Näkymä',
185
+ 'Materialized view' => 'Materialisoitunut näkymä',
186
  'View has been dropped.' => 'Näkymä on poistettu.',
187
  'View has been altered.' => 'Näkymää on muutettu.',
188
  'View has been created.' => 'Näkymä on luotu.',
189
  'Alter view' => 'Muuta näkymää',
190
  'Create view' => 'Luo näkymä',
 
191
 
192
  'Indexes' => 'Indeksit',
193
  'Indexes have been altered.' => 'Indeksejä on muutettu.',
adminer/adminer/adminer/lang/fr.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Mot de passe',
9
  'Select database' => 'Sélectionner la base de données',
10
  'Invalid database.' => 'Base de données invalide.',
11
- 'Create new database' => 'Créer une base de données',
12
  'Table has been dropped.' => 'La table a été effacée.',
13
  'Table has been altered.' => 'La table a été modifiée.',
14
  'Table has been created.' => 'La table a été créée.',
@@ -283,8 +282,7 @@ $translations = array(
283
  'Saving' => 'Enregistrement',
284
  'yes' => 'oui',
285
  'no' => 'non',
286
- 'Materialized View' => 'Vue matérialisée',
287
- 'Create materialized view' => 'Créer une vue matérialisée',
288
  '%d / ' => '%d / ',
289
  'Limit rows' => 'Limiter les lignes',
290
  'Default value' => 'Valeur par défaut',
8
  'Password' => 'Mot de passe',
9
  'Select database' => 'Sélectionner la base de données',
10
  'Invalid database.' => 'Base de données invalide.',
 
11
  'Table has been dropped.' => 'La table a été effacée.',
12
  'Table has been altered.' => 'La table a été modifiée.',
13
  'Table has been created.' => 'La table a été créée.',
282
  'Saving' => 'Enregistrement',
283
  'yes' => 'oui',
284
  'no' => 'non',
285
+ 'Materialized view' => 'Vue matérialisée',
 
286
  '%d / ' => '%d / ',
287
  'Limit rows' => 'Limiter les lignes',
288
  'Default value' => 'Valeur par défaut',
adminer/adminer/adminer/lang/gl.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Contrasinal',
9
  'Select database' => 'Seleccionar Base de datos',
10
  'Invalid database.' => 'Base de datos incorrecta.',
11
- 'Create new database' => 'Crear nova base de datos',
12
  'Table has been dropped.' => 'Eliminouse a táboa.',
13
  'Table has been altered.' => 'Modificouse a táboa.',
14
  'Table has been created.' => 'Creouse a táboa.',
@@ -267,10 +266,9 @@ $translations = array(
267
  'Edit all' => 'Editar todo',
268
  'HH:MM:SS' => 'HH:MM:SS',
269
  'Tables have been optimized.' => 'Optimizáronse as táboas',
270
- 'Materialized View' => 'Vista materializada',
271
  'Vacuum' => 'Baleirar',
272
  'Selected' => 'Selección',
273
- 'Create materialized view' => 'Crear vista materializada',
274
  'File must be in UTF-8 encoding.' => 'O ficheiro ten que estar codificado con UTF-8',
275
  'Modify' => 'Modificar',
276
  'Loading' => 'Cargando',
8
  'Password' => 'Contrasinal',
9
  'Select database' => 'Seleccionar Base de datos',
10
  'Invalid database.' => 'Base de datos incorrecta.',
 
11
  'Table has been dropped.' => 'Eliminouse a táboa.',
12
  'Table has been altered.' => 'Modificouse a táboa.',
13
  'Table has been created.' => 'Creouse a táboa.',
266
  'Edit all' => 'Editar todo',
267
  'HH:MM:SS' => 'HH:MM:SS',
268
  'Tables have been optimized.' => 'Optimizáronse as táboas',
269
+ 'Materialized view' => 'Vista materializada',
270
  'Vacuum' => 'Baleirar',
271
  'Selected' => 'Selección',
 
272
  'File must be in UTF-8 encoding.' => 'O ficheiro ten que estar codificado con UTF-8',
273
  'Modify' => 'Modificar',
274
  'Loading' => 'Cargando',
adminer/adminer/adminer/lang/hu.inc.php CHANGED
@@ -8,7 +8,6 @@ $translations = array(
8
  'Password' => 'Jelszó',
9
  'Select database' => 'Adatbázis kiválasztása',
10
  'Invalid database.' => 'Érvénytelen adatbázis.',
11
- 'Create new database' => 'Új adatbázis',
12
  'Table has been dropped.' => 'A tábla eldobva.',
13
  'Table has been altered.' => 'A tábla módosult.',
14
  'Table has been created.' => 'A tábla létrejött.',
8
  'Password' => 'Jelszó',
9
  'Select database' => 'Adatbázis kiválasztása',
10
  'Invalid database.' => 'Érvénytelen adatbázis.',
 
11
  'Table has been dropped.' => 'A tábla eldobva.',
12
  'Table has been altered.' => 'A tábla módosult.',
13
  'Table has been created.' => 'A tábla létrejött.',
adminer/adminer/adminer/lang/id.inc.php CHANGED
@@ -10,11 +10,11 @@ $translations = array(
10
  'Logout' => 'Keluar',
11
  'Logged as: %s' => 'Masuk sebagai: %s',
12
  'Logout successful.' => 'Berhasil keluar.',
13
- 'Invalid credentials.' => 'Akses invalid.',
14
  'Language' => 'Bahasa',
15
- 'Invalid CSRF token. Send the form again.' => 'Token CSRF invalid. Kirim ulang formulir.',
16
- 'No extension' => 'Ekstensi tidak tersedia',
17
- 'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak tersedia.',
18
  'Session support must be enabled.' => 'Dukungan sesi harus aktif.',
19
  'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.',
20
  '%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s',
@@ -44,26 +44,26 @@ $translations = array(
44
  'SQL command' => 'Perintah SQL',
45
  '%d query(s) executed OK.' => '%d kueri berhasil dijalankan.',
46
  'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.',
47
- 'No commands to execute.' => 'Tiada perintah untuk dijalankan.',
48
- 'Error in query' => 'Kesalahan dalam kueri',
49
  'Execute' => 'Jalankan',
50
- 'Stop on error' => 'Hentikan pada kesalahan',
51
- 'Show only errors' => 'Hanya tampilkan kesalahan',
52
  // sprintf() format for time of the command
53
  '%.3f s' => '%.3f s',
54
  'History' => 'Riwayat',
55
  'Clear' => 'Bersihkan',
56
- 'Edit all' => 'Edit semua',
57
 
 
58
  'File upload' => 'Unggah berkas',
59
  'From server' => 'Dari server',
60
  'Webserver file %s' => 'Berkas server web %s',
61
  'Run file' => 'Jalankan berkas',
62
- 'File does not exist.' => 'Berkas tidak ditemukan.',
63
  'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.',
64
  'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.',
65
- 'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %s bita.',
66
- 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar pengarah konfigurasi %s.',
67
 
68
  'Export' => 'Ekspor',
69
  'Output' => 'Hasil',
@@ -76,19 +76,18 @@ $translations = array(
76
  'database' => 'basis data',
77
  'Use' => 'Gunakan',
78
  'Select database' => 'Pilih basis data',
79
- 'Invalid database.' => 'Basis data invalid.',
80
- 'Create new database' => 'Buat basis data baru',
81
  'Database has been dropped.' => 'Basis data berhasil dihapus.',
82
  'Databases have been dropped.' => 'Basis data berhasil dihapus.',
83
  'Database has been created.' => 'Basis data berhasil dibuat.',
84
- 'Database has been renamed.' => 'Basis data berhasil diganti nama.',
85
  'Database has been altered.' => 'Basis data berhasil diubah.',
86
  'Alter database' => 'Ubah basis data',
87
  'Create database' => 'Buat basis data',
88
  'Database schema' => 'Skema basis data',
89
 
90
  // link to current database schema layout
91
- 'Permanent link' => 'Tautan permanen',
92
 
93
  // thousands separator - must contain single byte
94
  ',' => '.',
@@ -113,9 +112,9 @@ $translations = array(
113
  'Tables have been copied.' => 'Tabel berhasil disalin.',
114
 
115
  'Routines' => 'Rutin',
116
- 'Routine has been called, %d row(s) affected.' => array('Rutin telah dipanggil, %d baris terpengaruh.', 'Rutin telah dipanggil, %d baris terpengaruh'),
117
  'Call' => 'Panggilan',
118
- 'Parameter name' => 'Nama paramater',
119
  'Create procedure' => 'Buat prosedur',
120
  'Create function' => 'Buat fungsi',
121
  'Routine has been dropped.' => 'Rutin berhasil dihapus.',
@@ -123,14 +122,14 @@ $translations = array(
123
  'Routine has been created.' => 'Rutin berhasil dibuat.',
124
  'Alter function' => 'Ubah fungsi',
125
  'Alter procedure' => 'Ubah prosedur',
126
- 'Return type' => 'Jenis balikan',
127
 
128
- 'Events' => 'Peristiwa',
129
- 'Event has been dropped.' => 'Peristiwa berhasil dihapus.',
130
- 'Event has been altered.' => 'Peristiwa berhasil diubah.',
131
- 'Event has been created.' => 'Peristiwa berhasil dibuat.',
132
- 'Alter event' => 'Ubah peristiwa',
133
- 'Create event' => 'Buat peristiwa',
134
  'At given time' => 'Pada waktu tertentu',
135
  'Every' => 'Setiap',
136
  'Schedule' => 'Jadwal',
@@ -141,7 +140,7 @@ $translations = array(
141
  'Tables' => 'Tabel',
142
  'Tables and views' => 'Tabel dan tampilan',
143
  'Table' => 'Tabel',
144
- 'No tables.' => 'Tiada tabel.',
145
  'Alter table' => 'Ubah tabel',
146
  'Create table' => 'Buat tabel',
147
  'Table has been dropped.' => 'Tabel berhasil dihapus.',
@@ -156,16 +155,16 @@ $translations = array(
156
  'Column name' => 'Nama kolom',
157
  'Type' => 'Jenis',
158
  'Length' => 'Panjang',
159
- 'Auto Increment' => 'Kenaikan Otomatis',
160
  'Options' => 'Opsi',
161
  'Comment' => 'Komentar',
162
  'Default values' => 'Nilai bawaan',
163
  'Drop' => 'Hapus',
164
- 'Are you sure?' => 'Anda yakin',
165
  'Move up' => 'Naik',
166
  'Move down' => 'Turun',
167
  'Remove' => 'Hapus',
168
- 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s.',
169
 
170
  'Partition by' => 'Partisi menurut',
171
  'Partitions' => 'Partisi',
@@ -202,15 +201,15 @@ $translations = array(
202
  'ON UPDATE' => 'ON UPDATE',
203
  'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.',
204
 
205
- 'Triggers' => 'Picu',
206
- 'Add trigger' => 'Tambah picu',
207
- 'Trigger has been dropped.' => 'Picu berhasil dihapus.',
208
- 'Trigger has been altered.' => 'Picu berhasil diubah.',
209
- 'Trigger has been created.' => 'Picu berhasil dibuat.',
210
- 'Alter trigger' => 'Ubah picu',
211
- 'Create trigger' => 'Buat picu',
212
  'Time' => 'Waktu',
213
- 'Event' => 'Peristiwa',
214
  'Name' => 'Nama',
215
 
216
  'select' => 'pilih',
@@ -221,14 +220,14 @@ $translations = array(
221
  'Search' => 'Cari',
222
  'anywhere' => 'di mana pun',
223
  'Search data in tables' => 'Cari data dalam tabel',
224
- 'Sort' => 'Urutan',
225
  'descending' => 'menurun',
226
- 'Limit' => 'Limit',
227
  'Text length' => 'Panjang teks',
228
  'Action' => 'Tindakan',
229
  'Full table scan' => 'Pindai tabel lengkap',
230
  'Unable to select the table' => 'Gagal memilih tabel',
231
- 'No rows.' => 'Tiada baris.',
232
  '%d row(s)' => '%d baris',
233
  'Page' => 'Halaman',
234
  'last' => 'terakhir',
@@ -239,7 +238,7 @@ $translations = array(
239
  '%d row(s) have been imported.' => '%d baris berhasil diimpor.',
240
 
241
  // in-place editing in select
242
- 'Use edit link to modify this value.' => 'Gunakan tautan edit untuk mengubah nilai ini.',
243
 
244
  // %s can contain auto-increment value
245
  'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.',
@@ -247,30 +246,30 @@ $translations = array(
247
  'Item has been updated.' => 'Entri berhasil diperbarui.',
248
  '%d item(s) have been affected.' => '%d entri terpengaruh.',
249
  'New item' => 'Entri baru',
250
- 'original' => 'orisinal',
251
  // label for value '' in enum data type
252
  'empty' => 'kosong',
253
- 'edit' => 'edit',
254
- 'Edit' => 'Edit',
255
  'Insert' => 'Sisipkan',
256
  'Save' => 'Simpan',
257
- 'Save and continue edit' => 'Simpan dan terus mengedit',
258
- 'Save and insert next' => 'Simpan dan sisipkan yang lain',
259
  'Clone' => 'Gandakan',
260
  'Delete' => 'Hapus',
261
 
262
  'E-mail' => 'Surel',
263
  'From' => 'Dari',
264
- 'Subject' => 'Subjek',
265
  'Attachments' => 'Lampiran',
266
  'Send' => 'Kirim',
267
- '%d e-mail(s) have been sent.' => array('%d surel berhasil dikirim.', '%d surel berhasil dikirim'),
268
 
269
  // data type descriptions
270
  'Numbers' => 'Angka',
271
  'Date and time' => 'Tanggal dan waktu',
272
  'Strings' => 'String',
273
- 'Binary' => 'Biner',
274
  'Lists' => 'Daftar',
275
  'Network' => 'Jaringan',
276
  'Geometry' => 'Geometri',
@@ -298,7 +297,7 @@ $translations = array(
298
  'Schema has been created.' => 'Skema berhasil dibuat.',
299
  'Schema has been altered.' => 'Skema berhasil diubah.',
300
  'Schema' => 'Skema',
301
- 'Invalid schema.' => 'Skema invalid.',
302
 
303
  // PostgreSQL sequences support
304
  'Sequences' => 'Deret',
10
  'Logout' => 'Keluar',
11
  'Logged as: %s' => 'Masuk sebagai: %s',
12
  'Logout successful.' => 'Berhasil keluar.',
13
+ 'Invalid credentials.' => 'Akses tidak sah.',
14
  'Language' => 'Bahasa',
15
+ 'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
16
+ 'No extension' => 'Ekstensi tidak ada',
17
+ 'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak ada.',
18
  'Session support must be enabled.' => 'Dukungan sesi harus aktif.',
19
  'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.',
20
  '%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s',
44
  'SQL command' => 'Perintah SQL',
45
  '%d query(s) executed OK.' => '%d kueri berhasil dijalankan.',
46
  'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.',
47
+ 'No commands to execute.' => 'Tidak ada perintah untuk dijalankan.',
48
+ 'Error in query' => 'Galat dalam kueri',
49
  'Execute' => 'Jalankan',
50
+ 'Stop on error' => 'Hentikan jika galat',
51
+ 'Show only errors' => 'Hanya tampilkan galat',
52
  // sprintf() format for time of the command
53
  '%.3f s' => '%.3f s',
54
  'History' => 'Riwayat',
55
  'Clear' => 'Bersihkan',
 
56
 
57
+ 'Edit all' => 'Sunting semua',
58
  'File upload' => 'Unggah berkas',
59
  'From server' => 'Dari server',
60
  'Webserver file %s' => 'Berkas server web %s',
61
  'Run file' => 'Jalankan berkas',
62
+ 'File does not exist.' => 'Berkas tidak ada.',
63
  'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.',
64
  'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.',
65
+ 'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %sB.',
66
+ 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar direktif konfigurasi %s.',
67
 
68
  'Export' => 'Ekspor',
69
  'Output' => 'Hasil',
76
  'database' => 'basis data',
77
  'Use' => 'Gunakan',
78
  'Select database' => 'Pilih basis data',
79
+ 'Invalid database.' => 'Basis data tidak sah.',
 
80
  'Database has been dropped.' => 'Basis data berhasil dihapus.',
81
  'Databases have been dropped.' => 'Basis data berhasil dihapus.',
82
  'Database has been created.' => 'Basis data berhasil dibuat.',
83
+ 'Database has been renamed.' => 'Basis data berhasil diganti namanya.',
84
  'Database has been altered.' => 'Basis data berhasil diubah.',
85
  'Alter database' => 'Ubah basis data',
86
  'Create database' => 'Buat basis data',
87
  'Database schema' => 'Skema basis data',
88
 
89
  // link to current database schema layout
90
+ 'Permanent link' => 'Pranala permanen',
91
 
92
  // thousands separator - must contain single byte
93
  ',' => '.',
112
  'Tables have been copied.' => 'Tabel berhasil disalin.',
113
 
114
  'Routines' => 'Rutin',
115
+ 'Routine has been called, %d row(s) affected.' => 'Rutin telah dipanggil, %d baris terpengaruh.',
116
  'Call' => 'Panggilan',
117
+ 'Parameter name' => 'Nama parameter',
118
  'Create procedure' => 'Buat prosedur',
119
  'Create function' => 'Buat fungsi',
120
  'Routine has been dropped.' => 'Rutin berhasil dihapus.',
122
  'Routine has been created.' => 'Rutin berhasil dibuat.',
123
  'Alter function' => 'Ubah fungsi',
124
  'Alter procedure' => 'Ubah prosedur',
125
+ 'Return type' => 'Jenis pengembalian',
126
 
127
+ 'Events' => 'Even',
128
+ 'Event has been dropped.' => 'Even berhasil dihapus.',
129
+ 'Event has been altered.' => 'Even berhasil diubah.',
130
+ 'Event has been created.' => 'Even berhasil dibuat.',
131
+ 'Alter event' => 'Ubah even',
132
+ 'Create event' => 'Buat even',
133
  'At given time' => 'Pada waktu tertentu',
134
  'Every' => 'Setiap',
135
  'Schedule' => 'Jadwal',
140
  'Tables' => 'Tabel',
141
  'Tables and views' => 'Tabel dan tampilan',
142
  'Table' => 'Tabel',
143
+ 'No tables.' => 'Tidak ada tabel.',
144
  'Alter table' => 'Ubah tabel',
145
  'Create table' => 'Buat tabel',
146
  'Table has been dropped.' => 'Tabel berhasil dihapus.',
155
  'Column name' => 'Nama kolom',
156
  'Type' => 'Jenis',
157
  'Length' => 'Panjang',
158
+ 'Auto Increment' => 'Inkrementasi Otomatis',
159
  'Options' => 'Opsi',
160
  'Comment' => 'Komentar',
161
  'Default values' => 'Nilai bawaan',
162
  'Drop' => 'Hapus',
163
+ 'Are you sure?' => 'Anda yakin?',
164
  'Move up' => 'Naik',
165
  'Move down' => 'Turun',
166
  'Remove' => 'Hapus',
167
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Sudah lebih dumlah ruas maksimum yang diizinkan. Harap naikkan %s.',
168
 
169
  'Partition by' => 'Partisi menurut',
170
  'Partitions' => 'Partisi',
201
  'ON UPDATE' => 'ON UPDATE',
202
  'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.',
203
 
204
+ 'Triggers' => 'Pemicu',
205
+ 'Add trigger' => 'Tambah pemicu',
206
+ 'Trigger has been dropped.' => 'Pemicu berhasil dihapus.',
207
+ 'Trigger has been altered.' => 'Pemicu berhasil diubah.',
208
+ 'Trigger has been created.' => 'Pemicu berhasil dibuat.',
209
+ 'Alter trigger' => 'Ubah pemicu',
210
+ 'Create trigger' => 'Buat pemicu',
211
  'Time' => 'Waktu',
212
+ 'Event' => 'Even',
213
  'Name' => 'Nama',
214
 
215
  'select' => 'pilih',
220
  'Search' => 'Cari',
221
  'anywhere' => 'di mana pun',
222
  'Search data in tables' => 'Cari data dalam tabel',
223
+ 'Sort' => 'Urutkan',
224
  'descending' => 'menurun',
225
+ 'Limit' => 'Batas',
226
  'Text length' => 'Panjang teks',
227
  'Action' => 'Tindakan',
228
  'Full table scan' => 'Pindai tabel lengkap',
229
  'Unable to select the table' => 'Gagal memilih tabel',
230
+ 'No rows.' => 'Tidak ada baris.',
231
  '%d row(s)' => '%d baris',
232
  'Page' => 'Halaman',
233
  'last' => 'terakhir',
238
  '%d row(s) have been imported.' => '%d baris berhasil diimpor.',
239
 
240
  // in-place editing in select
241
+ 'Use edit link to modify this value.' => 'Gunakan pranala suntingan untuk mengubah nilai ini.',
242
 
243
  // %s can contain auto-increment value
244
  'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.',
246
  'Item has been updated.' => 'Entri berhasil diperbarui.',
247
  '%d item(s) have been affected.' => '%d entri terpengaruh.',
248
  'New item' => 'Entri baru',
249
+ 'original' => 'asli',
250
  // label for value '' in enum data type
251
  'empty' => 'kosong',
252
+ 'edit' => 'sunting',
253
+ 'Edit' => 'Sunting',
254
  'Insert' => 'Sisipkan',
255
  'Save' => 'Simpan',
256
+ 'Save and continue edit' => 'Simpan dan lanjut menyunting',
257
+ 'Save and insert next' => 'Simpan dan sisipkan berikutnya',
258