From aaa22e0ae7e37e337f411b00234663ba0596e2fa Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 5 Jul 2007 12:01:32 +0000 Subject: [PATCH] Add next git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@43 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- create.inc.php | 2 +- indexes.inc.php | 25 ++++++++++++++++--------- lang.inc.php | 1 + 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/create.inc.php b/create.inc.php index 4985fc03..bfa62657 100644 --- a/create.inc.php +++ b/create.inc.php @@ -78,9 +78,9 @@ foreach ($row["fields"] as $field) { -

+

diff --git a/indexes.inc.php b/indexes.inc.php index 4e063052..494d3afd 100644 --- a/indexes.inc.php +++ b/indexes.inc.php @@ -2,7 +2,7 @@ $index_types = array("PRIMARY", "UNIQUE", "INDEX", "FULLTEXT"); $indexes = indexes($_GET["indexes"]); $fields = array_keys(fields($_GET["indexes"])); -if ($_POST) { +if ($_POST && !$_POST["add"]) { $alter = array(); foreach ($_POST["indexes"] as $index) { if (in_array($index["type"], $index_types)) { @@ -36,7 +36,9 @@ if ($_POST) { page_header(lang('Indexes') . ': ' . htmlspecialchars($_GET["indexes"])); if ($_POST) { - echo "

" . lang('Unable to operate indexes') . ": " . htmlspecialchars($error) . "

\n"; + if (!$_POST["add"]) { + echo "

" . lang('Unable to operate indexes') . ": " . htmlspecialchars($error) . "

\n"; + } $row = $_POST; } else { $row = array("indexes" => $indexes); @@ -47,18 +49,23 @@ if ($_POST) { "; - ksort($index["columns"]); - foreach ($index["columns"] as $i => $column) { - echo ""; + if ($index["type"] || array_filter($index["columns"], 'strlen')) { + echo ""; + ksort($index["columns"]); + foreach ($index["columns"] as $i => $column) { + if (strlen($column)) { + echo ""; + } + } + echo ""; + echo "\n"; + $j++; } - echo ""; - echo "\n"; - $j++; } //! JavaScript for adding more indexes and columns ?>

+

diff --git a/lang.inc.php b/lang.inc.php index 2350d6b4..90dc6a72 100644 --- a/lang.inc.php +++ b/lang.inc.php @@ -61,6 +61,7 @@ function lang($idf = null) { 'Indexes' => 'Indexy', 'Unable to operate indexes' => 'Nepodařilo se zpracovat indexy', 'Alter indexes' => 'Změnit indexy', + 'Add next' => 'Přidat další', 'Language' => 'Jazyk', 'Select' => 'Vypsat', 'New item' => 'Nová položka',