diff --git a/adminer/create.inc.php b/adminer/create.inc.php
index eb37ad48..b636ca18 100644
--- a/adminer/create.inc.php
+++ b/adminer/create.inc.php
@@ -36,7 +36,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
$fields[] = "\n" . (strlen($_GET["create"]) ? (strlen($field["orig"]) ? "CHANGE " . idf_escape($field["orig"]) . " " : "ADD ") : " ")
. idf_escape($field["field"]) . process_type($type_field)
. ($field["null"] ? " NULL" : " NOT NULL") // NULL for timestamp
- . (strlen($_GET["create"]) && strlen($field["orig"]) && isset($orig_fields[$field["orig"]]["default"]) && $field["type"] != "timestamp" ? " DEFAULT " . $dbh->quote($orig_fields[$field["orig"]]["default"]) : "") //! timestamp
+ . (!$field["has_default"] || $field["auto_increment"] || ereg('text|blob', $field["type"]) ? "" : " DEFAULT " . ($field["type"] == "timestamp" && eregi("^CURRENT_TIMESTAMP( on update CURRENT_TIMESTAMP)?$", $field["default"]) ? $field["default"] : $dbh->quote($field["default"])))
. ($key == $_POST["auto_increment_col"] ? " AUTO_INCREMENT$auto_increment_index" : "")
. " COMMENT " . $dbh->quote($field["comment"])
. (strlen($_GET["create"]) ? " $after" : "")
@@ -105,7 +105,14 @@ if ($_POST) {
$row = table_status($_GET["create"]);
table_comment($row);
$row["name"] = $_GET["create"];
- $row["fields"] = array_values($orig_fields);
+ $row["fields"] = array();
+ foreach ($orig_fields as $field) {
+ $field["has_default"] = isset($field["default"]);
+ if ($field["on_update"]) {
+ $field["default"] .= " ON UPDATE $field[on_update]"; // CURRENT_TIMESTAMP
+ }
+ $row["fields"][] = $field;
+ }
if ($dbh->server_info >= 5.1) {
$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . $dbh->quote($_GET["db"]) . " AND TABLE_NAME = " . $dbh->quote($_GET["create"]);
$result = $dbh->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
@@ -124,7 +131,7 @@ if ($_POST) {
}
$collations = collations();
-$suhosin = floor(extension_loaded("suhosin") ? (min(ini_get("suhosin.request.max_vars"), ini_get("suhosin.post.max_vars")) - 13) / 8 : 0);
+$suhosin = floor(extension_loaded("suhosin") ? (min(ini_get("suhosin.request.max_vars"), ini_get("suhosin.post.max_vars")) - 13) / 10 : 0); // 10 - number of fields per row, 13 - number of other fields
if ($suhosin && count($row["fields"]) > $suhosin) {
echo "
" . h(lang('Maximum number of allowed fields exceeded. Please increase %s and %s.', 'suhosin.post.max_vars', 'suhosin.request.max_vars')) . "\n";
}
@@ -143,7 +150,8 @@ if ($suhosin && count($row["fields"]) > $suhosin) {
: ">
: " maxlength="60">
diff --git a/adminer/edit.inc.php b/adminer/edit.inc.php
index ffe892e7..951be334 100644
--- a/adminer/edit.inc.php
+++ b/adminer/edit.inc.php
@@ -3,14 +3,14 @@ $where = (isset($_GET["select"]) ? "" : where($_GET));
$update = ($where || $_POST["edit"]);
$fields = fields($_GET["edit"]);
foreach ($fields as $name => $field) {
- if ((isset($_GET["default"]) ? $field["auto_increment"] || ereg('text|blob', $field["type"]) : !isset($field["privileges"][$update ? "update" : "insert"])) || !strlen($adminer->fieldName($field))) {
+ if (!isset($field["privileges"][$update ? "update" : "insert"]) || !strlen($adminer->fieldName($field))) {
unset($fields[$name]);
}
}
if ($_POST && !$error && !isset($_GET["select"])) {
$location = $_SERVER["REQUEST_URI"]; // continue edit or insert
if (!$_POST["insert"]) {
- $location = ME . (isset($_GET["default"]) ? "table=" : "select=") . urlencode($_GET["edit"]);
+ $location = ME . "select=" . urlencode($_GET["edit"]);
$i = 0; // append &set converted to &where
foreach ((array) $_GET["set"] as $key => $val) {
if ($val == $_POST["fields"][$key]) {
@@ -21,24 +21,14 @@ if ($_POST && !$error && !isset($_GET["select"])) {
$set = array();
foreach ($fields as $name => $field) {
$val = process_input($field);
- if (!isset($_GET["default"])) {
- if ($val !== false || !$update) {
- $set[] = "\n" . idf_escape($name) . " = " . ($val !== false ? $val : "''");
- }
- } elseif ($val !== false) {
- if ($field["type"] == "timestamp" && $val != "NULL") { //! doesn't allow DEFAULT NULL and no ON UPDATE
- $set[] = "\nMODIFY " . idf_escape($name) . " timestamp" . ($field["null"] ? " NULL" : "") . " DEFAULT $val" . ($_POST["on_update"][bracket_escape($name)] ? " ON UPDATE CURRENT_TIMESTAMP" : "");
- } else {
- $set[] = "\nALTER " . idf_escape($name) . ($val == "NULL" ? " DROP DEFAULT" : " SET DEFAULT $val");
- }
+ if ($val !== false || !$update) {
+ $set[] = "\n" . idf_escape($name) . " = " . ($val !== false ? $val : "''");
}
}
if (!$set) {
redirect($location);
}
- if (isset($_GET["default"])) {
- query_redirect("ALTER TABLE " . idf_escape($_GET["edit"]) . implode(",", $set), $location, lang('Default values have been set.'));
- } elseif ($update) {
+ if ($update) {
query_redirect("UPDATE " . idf_escape($_GET["edit"]) . " SET" . implode(",", $set) . "\nWHERE $where\nLIMIT 1", $location, lang('Item has been updated.'));
} else {
query_redirect("INSERT INTO " . idf_escape($_GET["edit"]) . " SET" . implode(",", $set), $location, lang('Item has been inserted.'));
@@ -47,9 +37,9 @@ if ($_POST && !$error && !isset($_GET["select"])) {
$table_name = $adminer->tableName(table_status($_GET["edit"]));
page_header(
- (isset($_GET["default"]) ? lang('Default values') : ($update ? lang('Edit') : lang('Insert'))),
+ ($update ? lang('Edit') : lang('Insert')),
$error,
- array((isset($_GET["default"]) ? "table" : "select") => array($_GET["edit"], $table_name)),
+ array("select" => array($_GET["edit"], $table_name)),
$table_name
);
@@ -89,14 +79,6 @@ if ($fields) {
}
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($where && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
input($field, $value, $function);
- if (isset($_GET["default"]) && $field["type"] == "timestamp") {
- if (!isset($create) && !$_POST) {
- //! disable sql_mode NO_FIELD_OPTIONS
- $create = $dbh->result($dbh->query("SHOW CREATE TABLE " . idf_escape($_GET["edit"])), 1);
- }
- $checked = ($_POST ? $_POST["on_update"][bracket_escape($name)] : preg_match("~\n\\s*" . preg_quote(idf_escape($name), '~') . " timestamp.* on update CURRENT_TIMESTAMP~i", $create));
- echo '';
- }
echo "\n";
}
echo "\n";
@@ -111,7 +93,7 @@ if (isset($_GET["select"])) {
}
if ($fields) {
echo "\n";
- if (!isset($_GET["default"]) && !isset($_GET["select"])) {
+ if (!isset($_GET["select"])) {
echo "\n";
}
}
diff --git a/adminer/editing.js b/adminer/editing.js
index 802b4abc..1d1bafcb 100644
--- a/adminer/editing.js
+++ b/adminer/editing.js
@@ -125,10 +125,10 @@ function editing_type_change(type) {
}
}
-function column_comments_click(checked) {
+function column_show(checked, column) {
var trs = document.getElementById('edit-fields').getElementsByTagName('tr');
for (var i=0; i < trs.length; i++) {
- trs[i].getElementsByTagName('td')[5].className = (checked ? '' : 'hidden');
+ trs[i].getElementsByTagName('td')[column].className = (checked ? 'nowrap' : 'hidden');
}
}
diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php
index 77954298..2cbfa2d1 100644
--- a/adminer/include/adminer.inc.php
+++ b/adminer/include/adminer.inc.php
@@ -346,26 +346,24 @@ class Adminer {
*/
function editFunctions($field) {
$return = array("");
- if (!isset($_GET["default"])) {
- if (ereg('char|date|time', $field["type"])) {
- $return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
+ if (ereg('char|date|time', $field["type"])) {
+ $return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
+ }
+ if (!isset($_GET["call"]) && (isset($_GET["select"]) || where($_GET))) {
+ // relative functions
+ if (ereg('int|float|double|decimal', $field["type"])) {
+ $return = array("", "+", "-");
}
- if (!isset($_GET["call"]) && (isset($_GET["select"]) || where($_GET))) {
- // relative functions
- if (ereg('int|float|double|decimal', $field["type"])) {
- $return = array("", "+", "-");
- }
- if (ereg('date', $field["type"])) {
- $return[] = "+ interval";
- $return[] = "- interval";
- }
- if (ereg('time', $field["type"])) {
- $return[] = "addtime";
- $return[] = "subtime";
- }
+ if (ereg('date', $field["type"])) {
+ $return[] = "+ interval";
+ $return[] = "- interval";
+ }
+ if (ereg('time', $field["type"])) {
+ $return[] = "addtime";
+ $return[] = "subtime";
}
}
- if ($field["null"] || isset($_GET["default"])) {
+ if ($field["null"]) {
array_unshift($return, "NULL");
}
return $return;
diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php
index e0168b0d..e5f18799 100644
--- a/adminer/include/editing.inc.php
+++ b/adminer/include/editing.inc.php
@@ -73,6 +73,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
+ |
| >
| "; ?>
@@ -89,6 +90,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
| checked>
| checked>
+ | >" onchange="this.previousSibling.checked = true;">
| >" maxlength="255">
";
if ($field["type"] == "enum") {
echo " | " . (isset($_GET["select"]) ? " " : "");
- if ($field["null"] || isset($_GET["default"])) {
+ if ($field["null"]) {
echo " ';
}
- if (!isset($_GET["default"])) {
- echo "';
- }
+ echo "';
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
foreach ($matches[1] as $i => $val) {
$val = stripcslashes(str_replace("''", "'", $val));
$checked = (is_int($value) ? $value == $i+1 : $value === $val);
- echo " ';
+ echo " ';
}
} else {
$functions = (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
@@ -312,7 +310,7 @@ function input($field, $value, $function) {
foreach ($matches[1] as $i => $val) {
$val = stripcslashes(str_replace("''", "'", $val));
$checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
- echo " ';
+ echo " ';
}
} elseif (strpos($field["type"], "text") !== false) {
echo "';
@@ -336,9 +334,9 @@ function process_input($field) {
} elseif ($field["type"] == "enum" || $field["auto_increment"] ? !strlen($value) : $function == "NULL") {
return "NULL";
} elseif ($field["type"] == "enum") {
- return (isset($_GET["default"]) ? $dbh->quote($value) : intval($value));
+ return intval($value);
} elseif ($field["type"] == "set") {
- return (isset($_GET["default"]) ? $dbh->quote(implode(",", (array) $value)) : array_sum((array) $value));
+ return array_sum((array) $value);
} elseif (ereg('binary|blob', $field["type"])) {
$file = get_file($idf);
if (!is_string($file)) {
diff --git a/adminer/index.php b/adminer/index.php
index 4770b84e..180e0bcb 100644
--- a/adminer/index.php
+++ b/adminer/index.php
@@ -22,10 +22,6 @@ if (isset($_GET["download"])) {
} elseif (isset($_GET["privileges"])) {
include "./privileges.inc.php";
} else {
- if (isset($_GET["default"])) {
- // edit form is used for default values and distinguished by checking isset($_GET["default"]) in edit.inc.php
- $_GET["edit"] = $_GET["default"];
- }
if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
$_GET["edit"] = $_GET["select"];
}
diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php
index 15fc7bee..4adeaa74 100644
--- a/adminer/lang/cs.inc.php
+++ b/adminer/lang/cs.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Nepodařilo se vypsat tabulku',
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.',
'Comment' => 'Komentář',
- 'Default values have been set.' => 'Výchozí hodnoty byly nastaveny.',
'Default values' => 'Výchozí hodnoty',
'BOOL' => 'BOOL',
'Show column comments' => 'Zobrazit komentáře sloupců',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Verze MySQL: %s přes PHP extenzi %s',
'%d row(s)' => array('%d řádek', '%d řádky', '%d řádků'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'Při změně aktuální čas',
'Remove' => 'Odebrat',
'Are you sure?' => 'Opravdu?',
'Privileges' => 'Oprávnění',
diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php
index 83bc2a06..7b49b316 100644
--- a/adminer/lang/de.inc.php
+++ b/adminer/lang/de.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Auswahl der Tabelle fehlgeschlagen',
'Invalid CSRF token. Send the form again.' => 'CSRF Token ungültig. Bitte die Formulardaten erneut abschicken.',
'Comment' => 'Kommentar',
- 'Default values have been set.' => 'Standard Vorgabewerte sind erstellt worden.',
'Default values' => 'Vorgabewerte festlegen',
'BOOL' => 'BOOL',
'Show column comments' => 'Spaltenkommentare zeigen',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Version MySQL: %s, mit PHP-Erweiterung %s',
'%d row(s)' => array('%d Datensatz', '%d Datensätze'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Entfernen',
'Are you sure?' => 'Sind Sie sicher ?',
'Privileges' => 'Rechte',
diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php
index ea5aa861..0fbfa93d 100644
--- a/adminer/lang/es.inc.php
+++ b/adminer/lang/es.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'No posible seleccionar la tabla',
'Invalid CSRF token. Send the form again.' => 'Token CSRF inválido. Vuelva a enviar los datos del formulario.',
'Comment' => 'Comentario',
- 'Default values have been set.' => 'Valores predeterminados establecidos.',
'Default values' => 'Valores predeterminados',
'BOOL' => 'BOOL',
'Show column comments' => 'Mostrar comentario de columnas',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Versión MySQL: %s a través de extensión PHP %s',
'%d row(s)' => array('%d registro', '%d registros'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Eliminar',
'Are you sure?' => 'Está seguro?',
'Privileges' => 'Privilegios',
diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php
index c66429e6..1ff8f028 100644
--- a/adminer/lang/et.inc.php
+++ b/adminer/lang/et.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Tabeli valimine ebaõnnestus',
'Invalid CSRF token. Send the form again.' => 'Sobimatu CSRF, palun postitage vorm uuesti.',
'Comment' => 'Kommentaar',
- 'Default values have been set.' => 'Vaimimisi väärtused on edukalt määratud.',
'Default values' => 'Vaikimisi väärtused',
'BOOL' => 'Jah/Ei (BOOL)',
'Show column comments' => 'Kuva veeru kommentaarid',
@@ -133,7 +132,6 @@ $translations = array(
'Event' => 'Sündmus',
'%d row(s)' => array('%d rida', '%d rida'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Eemalda',
'Are you sure?' => 'Kas oled kindel?',
'Privileges' => 'Õigused',
diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php
index 269d0719..fd5dc5df 100644
--- a/adminer/lang/fr.inc.php
+++ b/adminer/lang/fr.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Impossible de sélectionner la table',
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalide. Veuillez réenvoyer le formulaire.',
'Comment' => 'Commentaire',
- 'Default values have been set.' => 'Valeur par défaut établie .',
'Default values' => 'Valeurs par défaut',
'BOOL' => 'BOOL',
'Show column comments' => 'Voir les commentaires sur les colonnes',
@@ -133,7 +132,6 @@ $translations = array(
'Event' => 'Évènement',
'%d row(s)' => array('%d ligne', '%d lignes'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Effacer',
'Are you sure?' => 'Êtes-vous certain?',
'Privileges' => 'Privilège',
diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php
index ca124a3c..9c47872c 100644
--- a/adminer/lang/it.inc.php
+++ b/adminer/lang/it.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Selezione della tabella non riuscita',
'Invalid CSRF token. Send the form again.' => 'Token CSRF non valido. Reinvia la richiesta.',
'Comment' => 'Commento',
- 'Default values have been set.' => 'Valore predefinito impostato.',
'Default values' => 'Valori predefiniti',
'BOOL' => 'BOOL',
'Show column comments' => 'Mostra i commenti delle colonne',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Versione MySQL: %s via estensione PHP %s',
'%d row(s)' => array('%d riga', '%d righe'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Rimuovi',
'Are you sure?' => 'Sicuro?',
'Privileges' => 'Privilegi',
diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php
index 24a7e172..5befed99 100644
--- a/adminer/lang/nl.inc.php
+++ b/adminer/lang/nl.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Onmogelijk tabel te selecteren',
'Invalid CSRF token. Send the form again.' => 'Ongeldig CSRF token. Verstuur het formulier opnieuw.',
'Comment' => 'Commentaar',
- 'Default values have been set.' => 'Standaard waarde ingesteld.',
'Default values' => 'Standaard waarden',
'BOOL' => 'BOOL',
'Show column comments' => 'Kolomcommentaar weergeven',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'MySQL versie: %s met PHP extensie %s',
'%d row(s)' => array('%d rij', '%d rijen'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => 'Verwijderen',
'Are you sure?' => 'Weet u het zeker?',
'Privileges' => 'Rechten',
diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php
index b2ee8329..740b95d1 100644
--- a/adminer/lang/ru.inc.php
+++ b/adminer/lang/ru.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Не удалось получить данные из таблицы',
'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF токен. Отправите форму ещё раз.',
'Comment' => 'Комментарий',
- 'Default values have been set.' => 'Были установлены значения по умолчанию.',
'Default values' => 'Значения по умолчанию',
'BOOL' => 'Булев тип',
'Show column comments' => 'Показать комментарии к колонке',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Версия MySQL: %s с PHP-расширением %s',
'%d row(s)' => array('%d строка', '%d строки', '%d строк'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ПРИ ИЗМЕНЕНИИ ТЕКУЩЕГО TIMESTAMP',
'Remove' => 'Удалить',
'Are you sure?' => 'Вы уверены?',
'Privileges' => 'Полномочия',
diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php
index 953e298f..cc21aadf 100644
--- a/adminer/lang/sk.inc.php
+++ b/adminer/lang/sk.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => 'Tabuľku sa nepodarilo vypísať',
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odošlite formulár znova.',
'Comment' => 'Komentár',
- 'Default values have been set.' => 'Východzie hodnoty boli nastavené.',
'Default values' => 'Východzie hodnoty',
'BOOL' => 'BOOL',
'Show column comments' => 'Zobraziť komentáre stĺpcov',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'Verzia MySQL: %s cez PHP rozšírenie %s',
'%d row(s)' => array('%d riadok', '%d riadky', '%d riadkov'),
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'Pri zmene aktuálny čas',
'Remove' => 'Odobrať',
'Are you sure?' => 'Naozaj?',
'Privileges' => 'Oprávnenia',
diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php
index c0011926..9c32277e 100644
--- a/adminer/lang/zh-tw.inc.php
+++ b/adminer/lang/zh-tw.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => '無法選擇該資料表',
'Invalid CSRF token. Send the form again.' => '無效的 CSRF token。請重新發送表單。',
'Comment' => '註解',
- 'Default values have been set.' => '預設值已設置。',
'Default values' => '預設值',
'BOOL' => 'BOOL',
'Show column comments' => '顯示列註解',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'MySQL版本:%s 透過PHP擴充模組 %s',
'%d row(s)' => '%d行',
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => '移除',
'Are you sure?' => '你確定嗎?',
'Privileges' => '權限',
diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php
index 63c24f25..add1c201 100644
--- a/adminer/lang/zh.inc.php
+++ b/adminer/lang/zh.inc.php
@@ -72,7 +72,6 @@ $translations = array(
'Unable to select the table' => '不能选择该表',
'Invalid CSRF token. Send the form again.' => '无效 CSRF 令牌。重新发送表单。',
'Comment' => '注释',
- 'Default values have been set.' => '默认值已设置。',
'Default values' => '默认值',
'BOOL' => 'BOOL',
'Show column comments' => '显示列注释',
@@ -134,7 +133,6 @@ $translations = array(
'MySQL version: %s through PHP extension %s' => 'MySQL 版本:%s 通过 PHP 扩展 %s',
'%d row(s)' => '%d 行',
'~ %s' => '~ %s',
- 'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
'Remove' => '移除',
'Are you sure?' => '你确定吗?',
'Privileges' => '权限',
diff --git a/adminer/table.inc.php b/adminer/table.inc.php
index 47c5cffa..c5655058 100644
--- a/adminer/table.inc.php
+++ b/adminer/table.inc.php
@@ -9,13 +9,9 @@ $is_view = !isset($table_status["Rows"]);
page_header(($result && $is_view ? lang('View') : lang('Table')) . ": " . h($_GET["table"]), $error);
if ($result) {
- $auto_increment_only = true;
echo "\n";
echo "" . lang('Column') . " | " . lang('Type') . " | " . lang('Comment') . " | \n";
while ($row = $result->fetch_assoc()) {
- if (!$row["auto_increment"]) {
- $auto_increment_only = false;
- }
echo "" . h($row["Field"]);
echo " | " . h($row["Type"]) . ($row["Null"] == "YES" ? " NULL" : "");
echo " | " . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : " ");
@@ -29,7 +25,6 @@ if ($result) {
echo '' . lang('Alter view') . '';
} else {
echo '' . lang('Alter table') . '';
- echo ($auto_increment_only ? '' : ' ' . lang('Default values') . '');
}
echo ' ' . lang('Select table') . '';
echo ' ' . lang('New item') . '';
diff --git a/changes.txt b/changes.txt
index c7936053..41197ea7 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,5 @@
-Adminer 2.0.1:
+Adminer 2.1.0:
+Edit default values directly in table creation
Display column comments in table overview
Respect max_allowed_packet in CSV import
Fix Editor date format
diff --git a/todo.txt b/todo.txt
index 6466889b..25f4e0c3 100644
--- a/todo.txt
+++ b/todo.txt
@@ -9,7 +9,6 @@ Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.ph
Highlight SQL textarea - may use external CodePress
Mass editation of individual rows
IE6 - |
---|
|