Revert drop removal (r887, r1195)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1336 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
254ba4a134
commit
5d89dc60c8
|
@ -16,6 +16,9 @@ if ($TABLE != "") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"] && !$_POST["down"]) {
|
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"] && !$_POST["down"]) {
|
||||||
|
if ($_POST["drop"]) {
|
||||||
|
query_redirect("DROP TABLE " . idf_escape($_GET["create"]), substr(ME, 0, -1), lang('Table has been dropped.'));
|
||||||
|
} else {
|
||||||
$auto_increment_index = " PRIMARY KEY";
|
$auto_increment_index = " PRIMARY KEY";
|
||||||
// don't overwrite primary key by auto_increment
|
// don't overwrite primary key by auto_increment
|
||||||
if ($TABLE != "" && $_POST["auto_increment_col"]) {
|
if ($TABLE != "" && $_POST["auto_increment_col"]) {
|
||||||
|
@ -94,6 +97,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
|
||||||
cookie("adminer_engine", $_POST["Engine"]);
|
cookie("adminer_engine", $_POST["Engine"]);
|
||||||
query_redirect("CREATE TABLE " . idf_escape($_POST["name"]) . " (" . substr($fields, 0, -1) . "\n) $status", $location, lang('Table has been created.'));
|
query_redirect("CREATE TABLE " . idf_escape($_POST["name"]) . " (" . substr($fields, 0, -1) . "\n) $status", $location, lang('Table has been created.'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), $TABLE);
|
page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), $TABLE);
|
||||||
|
@ -174,6 +178,7 @@ document.write('<label><input type="checkbox"<?php if ($column_comments) { ?> ch
|
||||||
<p>
|
<p>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
|
<?php if (strlen($_GET["create"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo $confirm; ?>><?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if ($connection->server_info >= 5.1) {
|
if ($connection->server_info >= 5.1) {
|
||||||
$partition_table = ereg('RANGE|LIST', $row["partition_by"]);
|
$partition_table = ereg('RANGE|LIST', $row["partition_by"]);
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP changes add.x to add_x
|
if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP changes add.x to add_x
|
||||||
if (DB !== $_POST["name"]) {
|
|
||||||
// create or rename database
|
|
||||||
restart_session();
|
restart_session();
|
||||||
|
if ($_POST["drop"]) {
|
||||||
|
unset($_SESSION["databases"][$_GET["server"]]);
|
||||||
|
query_redirect("DROP DATABASE " . idf_escape(DB), remove_from_uri("db|database"), lang('Database has been dropped.'));
|
||||||
|
} elseif (DB !== $_POST["name"]) {
|
||||||
|
// create or rename database
|
||||||
unset($_SESSION["databases"][$_GET["server"]]); // clear cache
|
unset($_SESSION["databases"][$_GET["server"]]); // clear cache
|
||||||
$dbs = explode("\n", str_replace("\r", "", $_POST["name"]));
|
$dbs = explode("\n", str_replace("\r", "", $_POST["name"]));
|
||||||
$failed = false;
|
$failed = false;
|
||||||
|
@ -70,7 +73,9 @@ if ($_POST) {
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!$_POST["add_x"] && $_GET["db"] == "") {
|
if (strlen(DB)) {
|
||||||
|
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'$confirm>\n";
|
||||||
|
} elseif (!$_POST["add_x"] && $_GET["db"] == "") {
|
||||||
echo "<input type='image' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
|
echo "<input type='image' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Vybrat databázi',
|
'Select database' => 'Vybrat databázi',
|
||||||
'Invalid database.' => 'Nesprávná databáze.',
|
'Invalid database.' => 'Nesprávná databáze.',
|
||||||
'Create new database' => 'Vytvořit novou databázi',
|
'Create new database' => 'Vytvořit novou databázi',
|
||||||
|
'Table has been dropped.' => 'Tabulka byla odstraněna.',
|
||||||
'Table has been altered.' => 'Tabulka byla změněna.',
|
'Table has been altered.' => 'Tabulka byla změněna.',
|
||||||
'Table has been created.' => 'Tabulka byla vytvořena.',
|
'Table has been created.' => 'Tabulka byla vytvořena.',
|
||||||
'Alter table' => 'Pozměnit tabulku',
|
'Alter table' => 'Pozměnit tabulku',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Datenbank auswählen',
|
'Select database' => 'Datenbank auswählen',
|
||||||
'Invalid database.' => 'Datenbank ungültig.',
|
'Invalid database.' => 'Datenbank ungültig.',
|
||||||
'Create new database' => 'Neue Datenbank',
|
'Create new database' => 'Neue Datenbank',
|
||||||
|
'Table has been dropped.' => 'Tabelle entfernt.',
|
||||||
'Table has been altered.' => 'Tabelle geändert.',
|
'Table has been altered.' => 'Tabelle geändert.',
|
||||||
'Table has been created.' => 'Tabelle erstellt.',
|
'Table has been created.' => 'Tabelle erstellt.',
|
||||||
'Alter table' => 'Tabelle ändern',
|
'Alter table' => 'Tabelle ändern',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Seleccionar Base de datos',
|
'Select database' => 'Seleccionar Base de datos',
|
||||||
'Invalid database.' => 'Base de datos inválida.',
|
'Invalid database.' => 'Base de datos inválida.',
|
||||||
'Create new database' => 'Nueva Base de datos',
|
'Create new database' => 'Nueva Base de datos',
|
||||||
|
'Table has been dropped.' => 'Tabla eliminada.',
|
||||||
'Table has been altered.' => 'Tabla modificada.',
|
'Table has been altered.' => 'Tabla modificada.',
|
||||||
'Table has been created.' => 'Tabla creada.',
|
'Table has been created.' => 'Tabla creada.',
|
||||||
'Alter table' => 'Modificar Estructura',
|
'Alter table' => 'Modificar Estructura',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Vali andmebaas',
|
'Select database' => 'Vali andmebaas',
|
||||||
'Invalid database.' => 'Tundmatu andmebaas.',
|
'Invalid database.' => 'Tundmatu andmebaas.',
|
||||||
'Create new database' => 'Loo uus andmebaas',
|
'Create new database' => 'Loo uus andmebaas',
|
||||||
|
'Table has been dropped.' => 'Tabel on edukalt kustutatud.',
|
||||||
'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
|
'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
|
||||||
'Table has been created.' => 'Tabel on edukalt loodud.',
|
'Table has been created.' => 'Tabel on edukalt loodud.',
|
||||||
'Alter table' => 'Muuda tabeli struktuuri',
|
'Alter table' => 'Muuda tabeli struktuuri',
|
||||||
|
|
|
@ -2,14 +2,15 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Authentification',
|
'Login' => 'Authentification',
|
||||||
'Logout successful.' => 'Aurevoir!',
|
'Logout successful.' => 'Aurevoir!',
|
||||||
'Invalid credentials.' => 'Authentification échouée',
|
'Invalid credentials.' => 'Authentification échouée.',
|
||||||
'Server' => 'Serveur',
|
'Server' => 'Serveur',
|
||||||
'Username' => 'Utilisateur',
|
'Username' => 'Utilisateur',
|
||||||
'Password' => 'Mot de passe',
|
'Password' => 'Mot de passe',
|
||||||
'Select database' => 'Selectionner la base de donnée',
|
'Select database' => 'Selectionner la base de donnée',
|
||||||
'Invalid database.' => 'Base de donnée invalide',
|
'Invalid database.' => 'Base de donnée invalide.',
|
||||||
'Create new database' => 'Créer une base de donnée',
|
'Create new database' => 'Créer une base de donnée',
|
||||||
'Table has been altered.' => 'Table modifiée',
|
'Table has been dropped.' => 'Table effacée.',
|
||||||
|
'Table has been altered.' => 'Table modifiée.',
|
||||||
'Table has been created.' => 'Table créée.',
|
'Table has been created.' => 'Table créée.',
|
||||||
'Alter table' => 'Modifier la table',
|
'Alter table' => 'Modifier la table',
|
||||||
'Create table' => 'Créer une table',
|
'Create table' => 'Créer une table',
|
||||||
|
@ -57,7 +58,7 @@ $translations = array(
|
||||||
'Sort' => 'Ordonner',
|
'Sort' => 'Ordonner',
|
||||||
'descending' => 'décroissant',
|
'descending' => 'décroissant',
|
||||||
'Limit' => 'Limit',
|
'Limit' => 'Limit',
|
||||||
'No rows.' => 'Aucun résultat',
|
'No rows.' => 'Aucun résultat.',
|
||||||
'Action' => 'Action',
|
'Action' => 'Action',
|
||||||
'edit' => 'modifier',
|
'edit' => 'modifier',
|
||||||
'Page' => 'Page',
|
'Page' => 'Page',
|
||||||
|
@ -170,9 +171,9 @@ $translations = array(
|
||||||
'At given time' => 'À un moment précis',
|
'At given time' => 'À un moment précis',
|
||||||
'Save and continue edit' => 'Sauvegarder et continuer l\'édition',
|
'Save and continue edit' => 'Sauvegarder et continuer l\'édition',
|
||||||
'original' => 'original',
|
'original' => 'original',
|
||||||
'Tables have been truncated.' => 'Les tables ont été tronquées',
|
'Tables have been truncated.' => 'Les tables ont été tronquées.',
|
||||||
'Tables have been moved.' => 'Les tables ont été déplacées',
|
'Tables have been moved.' => 'Les tables ont été déplacées.',
|
||||||
'Tables have been dropped.' => 'Les tables ont été effacées',
|
'Tables have been dropped.' => 'Les tables ont été effacées.',
|
||||||
'Tables and views' => 'Tables et vues',
|
'Tables and views' => 'Tables et vues',
|
||||||
'Engine' => 'Moteur',
|
'Engine' => 'Moteur',
|
||||||
'Collation' => 'Collation',
|
'Collation' => 'Collation',
|
||||||
|
@ -191,12 +192,12 @@ $translations = array(
|
||||||
'%d item(s) have been affected.' => array('%d élément ont été modifié.', '%d éléments ont été modifié.'),
|
'%d item(s) have been affected.' => array('%d élément ont été modifié.', '%d éléments ont été modifié.'),
|
||||||
'whole result' => 'résultat entier',
|
'whole result' => 'résultat entier',
|
||||||
'Clone' => 'Cloner',
|
'Clone' => 'Cloner',
|
||||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Le nombre de champs maximum est dépassé. Veuillez augmenter %s et %s',
|
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Le nombre de champs maximum est dépassé. Veuillez augmenter %s et %s.',
|
||||||
'Partition by' => 'Partitionné par',
|
'Partition by' => 'Partitionné par',
|
||||||
'Partitions' => 'Partitions',
|
'Partitions' => 'Partitions',
|
||||||
'Partition name' => 'Nom de la partition',
|
'Partition name' => 'Nom de la partition',
|
||||||
'Values' => 'Valeurs',
|
'Values' => 'Valeurs',
|
||||||
'%d row(s) have been imported.' => array('%d ligne a été importé','%d lignes ont été importé'),
|
'%d row(s) have been imported.' => array('%d ligne a été importé.','%d lignes ont été importé.'),
|
||||||
'Show structure' => 'Structure de la table',
|
'Show structure' => 'Structure de la table',
|
||||||
'(anywhere)' => '(n\'importe où)',
|
'(anywhere)' => '(n\'importe où)',
|
||||||
'CSV Import' => 'Importation CVS',
|
'CSV Import' => 'Importation CVS',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Seleziona database',
|
'Select database' => 'Seleziona database',
|
||||||
'Invalid database.' => 'Database non valido.',
|
'Invalid database.' => 'Database non valido.',
|
||||||
'Create new database' => 'Crea nuovo database',
|
'Create new database' => 'Crea nuovo database',
|
||||||
|
'Table has been dropped.' => 'Tabella eliminata.',
|
||||||
'Table has been altered.' => 'Tabella modificata.',
|
'Table has been altered.' => 'Tabella modificata.',
|
||||||
'Table has been created.' => 'Tabella creata.',
|
'Table has been created.' => 'Tabella creata.',
|
||||||
'Alter table' => 'Modifica tabella',
|
'Alter table' => 'Modifica tabella',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Database selecteren',
|
'Select database' => 'Database selecteren',
|
||||||
'Invalid database.' => 'Ongeldige database.',
|
'Invalid database.' => 'Ongeldige database.',
|
||||||
'Create new database' => 'Nieuwe database',
|
'Create new database' => 'Nieuwe database',
|
||||||
|
'Table has been dropped.' => 'Tabel verwijderd.',
|
||||||
'Table has been altered.' => 'Tabel aangepast.',
|
'Table has been altered.' => 'Tabel aangepast.',
|
||||||
'Table has been created.' => 'Tabel aangemaakt.',
|
'Table has been created.' => 'Tabel aangemaakt.',
|
||||||
'Alter table' => 'Tabel aanpassen',
|
'Alter table' => 'Tabel aanpassen',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Выбрать базу данных',
|
'Select database' => 'Выбрать базу данных',
|
||||||
'Invalid database.' => 'Плохая база данных.',
|
'Invalid database.' => 'Плохая база данных.',
|
||||||
'Create new database' => 'Создать новую базу данных',
|
'Create new database' => 'Создать новую базу данных',
|
||||||
|
'Table has been dropped.' => 'Таблица была удалена.',
|
||||||
'Table has been altered.' => 'Таблица была изменена.',
|
'Table has been altered.' => 'Таблица была изменена.',
|
||||||
'Table has been created.' => 'Таблица была создана.',
|
'Table has been created.' => 'Таблица была создана.',
|
||||||
'Alter table' => 'Изменить таблицу',
|
'Alter table' => 'Изменить таблицу',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => 'Vybrať databázu',
|
'Select database' => 'Vybrať databázu',
|
||||||
'Invalid database.' => 'Nesprávna databáza.',
|
'Invalid database.' => 'Nesprávna databáza.',
|
||||||
'Create new database' => 'Vytvoriť novú databázu',
|
'Create new database' => 'Vytvoriť novú databázu',
|
||||||
|
'Table has been dropped.' => 'Tabuľka bola odstránená.',
|
||||||
'Table has been altered.' => 'Tabuľka bola zmenená.',
|
'Table has been altered.' => 'Tabuľka bola zmenená.',
|
||||||
'Table has been created.' => 'Tabuľka bola vytvorená.',
|
'Table has been created.' => 'Tabuľka bola vytvorená.',
|
||||||
'Alter table' => 'Zmeniť tabuľku',
|
'Alter table' => 'Zmeniť tabuľku',
|
||||||
|
|
|
@ -9,6 +9,7 @@ $translations = array(
|
||||||
'Select database' => '选择数据库',
|
'Select database' => '选择数据库',
|
||||||
'Invalid database.' => '无效数据库。',
|
'Invalid database.' => '无效数据库。',
|
||||||
'Create new database' => '创建新数据库',
|
'Create new database' => '创建新数据库',
|
||||||
|
'Table has been dropped.' => '已丢弃表。',
|
||||||
'Table has been altered.' => '已更改表。',
|
'Table has been altered.' => '已更改表。',
|
||||||
'Table has been created.' => '已创建表。',
|
'Table has been created.' => '已创建表。',
|
||||||
'Alter table' => '更改表',
|
'Alter table' => '更改表',
|
||||||
|
|
Loading…
Reference in a new issue