diff options
Diffstat (limited to 'phpBB/phpbb/search/fulltext_mysql.php')
-rw-r--r-- | phpBB/phpbb/search/fulltext_mysql.php | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index 50d2d2577f..cdd2da222f 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -10,14 +10,6 @@ namespace phpbb\search; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * fulltext_mysql * Fulltext search for MySQL * @package search @@ -781,7 +773,7 @@ class fulltext_mysql extends \phpbb\search\base $alter[] = 'ADD FULLTEXT (post_subject)'; } - if (!isset($this->stats['post_text'])) + if (!isset($this->stats['post_content'])) { if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>=')) { @@ -791,12 +783,8 @@ class fulltext_mysql extends \phpbb\search\base { $alter[] = 'MODIFY post_text mediumtext NOT NULL'; } - $alter[] = 'ADD FULLTEXT (post_text)'; - } - if (!isset($this->stats['post_content'])) - { - $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)'; + $alter[] = 'ADD FULLTEXT post_content (post_text, post_subject)'; } if (sizeof($alter)) @@ -834,11 +822,6 @@ class fulltext_mysql extends \phpbb\search\base $alter[] = 'DROP INDEX post_subject'; } - if (isset($this->stats['post_text'])) - { - $alter[] = 'DROP INDEX post_text'; - } - if (isset($this->stats['post_content'])) { $alter[] = 'DROP INDEX post_content'; @@ -864,7 +847,7 @@ class fulltext_mysql extends \phpbb\search\base $this->get_stats(); } - return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false; + return isset($this->stats['post_subject']) && isset($this->stats['post_content']); } /** @@ -904,11 +887,7 @@ class fulltext_mysql extends \phpbb\search\base if ($index_type == 'FULLTEXT') { - if ($row['Key_name'] == 'post_text') - { - $this->stats['post_text'] = $row; - } - else if ($row['Key_name'] == 'post_subject') + if ($row['Key_name'] == 'post_subject') { $this->stats['post_subject'] = $row; } |