]> git.joonet.de Git - adminer.git/commitdiff
Prepare for version 2
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 8 May 2009 05:57:01 +0000 (05:57 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 8 May 2009 05:57:01 +0000 (05:57 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@604 7c3ca157-0c34-0410-bff1-cbf682f78f5c

editing.inc.php
functions.inc.php
mysql.inc.php

index e246faa694928f11c68e97122d777586af81a59f..cf8d23166b6f78eec566cd5d35834a78be8cc5bc 100644 (file)
@@ -91,7 +91,7 @@ function edit_type($key, $field, $collations) {
        ?>
 <td><select name="<?php echo $key; ?>[type]" onchange="type_change(this);"><?php echo optionlist(array_keys($types), $field["type"]); ?></select></td>
 <td><input name="<?php echo $key; ?>[length]" value="<?php echo htmlspecialchars($field["length"]); ?>" size="3" /></td>
-<td><select name="<?php echo $key; ?>[collation]"<?php echo (preg_match('~char|text|enum|set~', $field["type"]) ? "" : " class='hidden'"); ?>><option value="">(<?php echo lang('collation'); ?>)</option><?php echo optionlist($collations, $field["collation"]); ?></select> <select name="<?php echo $key; ?>[unsigned]"<?php echo (!$field["type"] || preg_match('~int|float|double|decimal~', $field["type"]) ? "" : " class='hidden'"); ?>><?php echo optionlist($unsigned, $field["unsigned"]); ?></select></td>
+<td><?php echo "<select name=\"$key" . '[collation]"' . (preg_match('~char|text|enum|set~', $field["type"]) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')</option>' . optionlist($collations, $field["collation"]) . '</select>' . ($unsigned ? " <select name=\"$key" . '[unsigned]"' . (!$field["type"] || preg_match('~int|float|double|decimal~', $field["type"]) ? "" : " class='hidden'") . '>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : ''); ?></td>
 <?php
 }
 
index 19ab251defa4fd626e69fff7aa605d2aa0a6ea69..456f76d4b669bfd14506326ed042f5ebb45cc651 100644 (file)
@@ -41,14 +41,6 @@ function get_vals($query) {
        return $return;
 }
 
-function table_status($table) {
-       global $dbh;
-       $result = $dbh->query("SHOW TABLE STATUS LIKE '" . $dbh->escape_string(addcslashes($table, "%_")) . "'");
-       $return = $result->fetch_assoc();
-       $result->free();
-       return $return;
-}
-
 function unique_idf($row, $indexes) {
        foreach ($indexes as $index) {
                if ($index["type"] == "PRIMARY" || $index["type"] == "UNIQUE") {
index b8bee3196d89d1b555cee37f7042f0197371a550..4a22c1542e63a17dd3cdca1ae4a39c50112b08f6 100644 (file)
@@ -284,6 +284,14 @@ function get_databases() {
        return $return;
 }
 
+function table_status($table) {
+       global $dbh;
+       $result = $dbh->query("SHOW TABLE STATUS LIKE '" . $dbh->escape_string(addcslashes($table, "%_")) . "'");
+       $return = $result->fetch_assoc();
+       $result->free();
+       return $return;
+}
+
 function fields($table) {
        global $dbh;
        $return = array();