diff --git a/tbl_addfield.php3 b/tbl_addfield.php3 index 4a2571f12..6a78f257e 100755 --- a/tbl_addfield.php3 +++ b/tbl_addfield.php3 @@ -124,6 +124,21 @@ if (isset($submit)) { } } // end if + + // Builds the fulltext statements and updates the table + $fulltext = ''; + if (MYSQL_INT_VERSION >= 32323 && isset($field_fulltext)) { + for ($i = 0; $i < count($field_fulltext); $i++) { + $j = $field_fulltext[$i]; + $fulltext .= backquote($field_name[$j]) . ', '; + } // end for + $fulltext = ereg_replace(', $', '', $fulltext); + if (!empty($fulltext)) { + $sql_query .= "\n" . 'ALTER TABLE ' . backquote($db) . '.' . backquote($table) . ' ADD FULLTEXT (' . $fulltext . ')'; + $result = mysql_query('ALTER TABLE ' . backquote($db) . '.' . backquote($table) . ' ADD UNIQUE (' . $fulltext . ')') or mysql_die(); + } + } // end if + // Go back to table properties $message = $strTable . ' ' . htmlspecialchars($table) . ' ' . $strHasBeenAltered; include('./tbl_properties.php3'); diff --git a/tbl_alter.php3 b/tbl_alter.php3 index e0c85f29b..2900515cb 100755 --- a/tbl_alter.php3 +++ b/tbl_alter.php3 @@ -77,6 +77,7 @@ if (isset($submit)) { $sql_query = 'ALTER TABLE ' . backquote($db) . '.' . backquote($table) . ' CHANGE ' . $query; $result = mysql_query($sql_query) or mysql_die(); $message = $strTable . ' ' . htmlspecialchars($table) . ' ' . $strHasBeenAltered; + $btnDrop = 'Fake'; include('./tbl_properties.php3'); exit(); } diff --git a/tbl_create.php3 b/tbl_create.php3 index 90a83ce9f..8e701da1c 100755 --- a/tbl_create.php3 +++ b/tbl_create.php3 @@ -130,7 +130,29 @@ if (isset($submit)) { if (!empty($unique)) { $unique = ', UNIQUE (' . $unique . ')'; } - $query_keys = $primary . $index . $unique; + + // Builds the fulltextes statements + if (!isset($fulltext)) { + $fulltext = ''; + } + if (!isset($field_fulltext) || MYSQL_INT_VERSION < 32323) { + $field_fulltext = array(); + } + for ($i = 0; $i < count($field_fulltext); $i++) { + $j = $field_fulltext[$i]; + if (!empty($field_name[$j])) { + if (get_magic_quotes_gpc()) { + $field_name[$j] = stripslashes($field_name[$j]); + } + $fulltext .= backquote($field_name[$j]) . ', '; + } + } // end for + $fulltext = ereg_replace(', $', '', $fulltext); + if (!empty($fulltext)) { + $fulltext = ', FULLTEXT (' . $fulltext . ')'; + } + + $query_keys = $primary . $index . $unique . $fulltext; $query_keys = ereg_replace(', $', '', $query_keys); // Builds the 'create table' statement diff --git a/tbl_properties.inc.php3 b/tbl_properties.inc.php3 index a0f5a825b..a0f87f7e9 100755 --- a/tbl_properties.inc.php3 +++ b/tbl_properties.inc.php3 @@ -39,6 +39,7 @@ if (!$is_backup) { echo "