Edit default values directly in table creation
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@993 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
79ed61b363
commit
4cead5602f
|
@ -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 "<p class='error'>" . 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) {
|
|||
<?php echo lang('Auto Increment'); ?>: <input name="Auto_increment" size="6" value="<?php echo intval($row["Auto_increment"]); ?>">
|
||||
<?php echo lang('Comment'); ?>: <input name="Comment" value="<?php echo h($row["Comment"]); ?>" maxlength="60">
|
||||
<script type="text/javascript">
|
||||
document.write('<label><input type="checkbox"<?php if ($column_comments) { ?> checked<?php } ?> onclick="column_comments_click(this.checked);"><?php echo lang('Show column comments'); ?><\/label>');
|
||||
document.write('<label><input type="checkbox" onclick="column_show(this.checked, 5);"><?php echo lang('Default values'); ?><\/label>');
|
||||
document.write('<label><input type="checkbox"<?php if ($column_comments) { ?> checked<?php } ?> onclick="column_show(this.checked, 6);"><?php echo lang('Show column comments'); ?><\/label>');
|
||||
</script>
|
||||
<p>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
|
|
@ -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 '<label><input type="checkbox" name="on_update[' . h(bracket_escape($name)) . ']" value="1"' . ($checked ? ' checked' : '') . '>' . lang('ON UPDATE CURRENT_TIMESTAMP') . '</label>';
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
@ -111,7 +93,7 @@ if (isset($_GET["select"])) {
|
|||
}
|
||||
if ($fields) {
|
||||
echo "<input type='submit' value='" . lang('Save') . "'>\n";
|
||||
if (!isset($_GET["default"]) && !isset($_GET["select"])) {
|
||||
if (!isset($_GET["select"])) {
|
||||
echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "'>\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -73,6 +73,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
|||
<?php if ($type == "TABLE") { ?>
|
||||
<td><?php echo lang('NULL'); ?>
|
||||
<td><input type="radio" name="auto_increment_col" value=""><?php echo lang('Auto Increment'); ?>
|
||||
<td class="hidden"><?php echo lang('Default values'); ?>
|
||||
<td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><?php echo lang('Comment'); ?>
|
||||
<?php } ?>
|
||||
<td><?php echo "<input type='image' name='add[0]' src='../adminer/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
|
||||
|
@ -89,6 +90,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
|||
<?php if ($type == "TABLE") { ?>
|
||||
<td><input type="checkbox" name="fields[<?php echo $i; ?>][null]" value="1"<?php if ($field["null"]) { ?> checked<?php } ?>>
|
||||
<td><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?>>
|
||||
<td class="nowrap hidden"><input type="checkbox" name="fields[<?php echo $i; ?>][has_default]" value="1"<?php echo ($field["has_default"] ? " checked" : ""); ?>><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onchange="this.previousSibling.checked = true;">
|
||||
<td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo h($field["comment"]); ?>" maxlength="255">
|
||||
<?php } ?>
|
||||
<?php
|
||||
|
|
|
@ -287,17 +287,15 @@ function input($field, $value, $function) {
|
|||
echo "<td class='function'>";
|
||||
if ($field["type"] == "enum") {
|
||||
echo " <td>" . (isset($_GET["select"]) ? " <label><input type='radio' name='fields[$name]' value='-1' checked><em>" . lang('original') . "</em></label>" : "");
|
||||
if ($field["null"] || isset($_GET["default"])) {
|
||||
if ($field["null"]) {
|
||||
echo " <label><input type='radio' name='fields[$name]' value=''" . (($field["null"] ? isset($value) : strlen($value)) || isset($_GET["select"]) ? '' : ' checked') . '>' . ($field["null"] ? '<em>NULL</em>' : '') . '</label>';
|
||||
}
|
||||
if (!isset($_GET["default"])) {
|
||||
echo "<input type='radio' name='fields[$name]' value='0'" . ($value === 0 ? ' checked' : '') . '>';
|
||||
}
|
||||
echo "<input type='radio' name='fields[$name]' value='0'" . ($value === 0 ? ' checked' : '') . '>';
|
||||
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 " <label><input type='radio' name='fields[$name]' value='" . (isset($_GET["default"]) ? (strlen($val) ? h($val) : " ") : $i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($val) . '</label>';
|
||||
echo " <label><input type='radio' name='fields[$name]' value='" . ($i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($val) . '</label>';
|
||||
}
|
||||
} 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 " <label><input type='checkbox' name='fields[$name][$i]' value='" . (isset($_GET["default"]) ? h($val) : 1 << $i) . "'" . ($checked ? ' checked' : '') . "$onchange>" . h($val) . '</label>';
|
||||
echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (1 << $i) . "'" . ($checked ? ' checked' : '') . "$onchange>" . h($val) . '</label>';
|
||||
}
|
||||
} elseif (strpos($field["type"], "text") !== false) {
|
||||
echo "<textarea name='fields[$name]' cols='50' rows='12'$onchange>" . h($value) . '</textarea>';
|
||||
|
@ -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)) {
|
||||
|
|
|
@ -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"];
|
||||
}
|
||||
|
|
|
@ -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í',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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' => 'Полномочия',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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' => '權限',
|
||||
|
|
|
@ -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' => '权限',
|
||||
|
|
|
@ -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 "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . "<td>" . lang('Comment') . "</thead>\n";
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if (!$row["auto_increment"]) {
|
||||
$auto_increment_only = false;
|
||||
}
|
||||
echo "<tr><th>" . h($row["Field"]);
|
||||
echo "<td>" . h($row["Type"]) . ($row["Null"] == "YES" ? " <i>NULL</i>" : "");
|
||||
echo "<td>" . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : " ");
|
||||
|
@ -29,7 +25,6 @@ if ($result) {
|
|||
echo '<a href="' . h(ME) . 'view=' . urlencode($_GET["table"]) . '">' . lang('Alter view') . '</a>';
|
||||
} else {
|
||||
echo '<a href="' . h(ME) . 'create=' . urlencode($_GET["table"]) . '">' . lang('Alter table') . '</a>';
|
||||
echo ($auto_increment_only ? '' : ' <a href="' . h(ME) . 'default=' . urlencode($_GET["table"]) . '">' . lang('Default values') . '</a>');
|
||||
}
|
||||
echo ' <a href="' . h(ME) . 'select=' . urlencode($_GET["table"]) . '">' . lang('Select table') . '</a>';
|
||||
echo ' <a href="' . h(ME) . 'edit=' . urlencode($_GET["table"]) . '">' . lang('New item') . '</a>';
|
||||
|
|
|
@ -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
|
||||
|
|
1
todo.txt
1
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 - <label for>
|
||||
Edit default values directly in table creation
|
||||
Offer enum and set items in search - whisperer
|
||||
Use event $intervals + microseconds in relative date functions
|
||||
Table status cache - SHOW TABLE STATUS is slow with big InnoDB tables
|
||||
|
|
Loading…
Reference in a new issue