diff options
author | Nils Adermann <naderman@naderman.de> | 2006-07-27 19:02:47 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-07-27 19:02:47 +0000 |
commit | 007f4f69872f0e8f9d848229078e488f620eaca1 (patch) | |
tree | 5055f20042426a0da42a24c556ee58cb10dcae89 /phpBB/includes/search/fulltext_mysql.php | |
parent | 412cf506891e7e35dcf1b35190bc2a05d823bb96 (diff) | |
download | forums-007f4f69872f0e8f9d848229078e488f620eaca1.tar forums-007f4f69872f0e8f9d848229078e488f620eaca1.tar.gz forums-007f4f69872f0e8f9d848229078e488f620eaca1.tar.bz2 forums-007f4f69872f0e8f9d848229078e488f620eaca1.tar.xz forums-007f4f69872f0e8f9d848229078e488f620eaca1.zip |
- fixed the age calculation (note: turn on your brain before commiting something like this the next time) [Bug #3337]
- removed the split_words array, introduced an enforced search_query
- the forum used for global topics in the search is now a forum, and no longer a category [Bug #2561]
- Bug #3404
- allow accessing reports by report_id, in contrast to mcp_queue this cannot just use the post id, since there can be multiple closed reports per post, so closed reports have to be accessed by report id, open reports, can optionally be accessed by report id or post id [Bug #3149]
- only attempt to unflag reported topics on closing a report when there are any without other reported posts [Bug #3057]
- updated fulltext_mysql to use the the search_query string
- overwrote the old fulltext_native with our improved version since it consumes too much time to maintain boths and we would switch to the improved version later anyway
- always show a link to search a user's posts even if the postcount is zero since he might only have posted in forums which do not count posts [Bug #3267]
git-svn-id: file:///svn/phpbb/trunk@6211 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search/fulltext_mysql.php')
-rw-r--r-- | phpBB/includes/search/fulltext_mysql.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 0f69d00a66..3e904e22e5 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -27,8 +27,10 @@ include_once($phpbb_root_path . 'includes/search/search.' . $phpEx); */ class fulltext_mysql extends search_backend { - var $stats; - var $word_length; + var $stats = array(); + var $word_length = array(); + var $split_words = array(); + var $common_words = array(); function fulltext_mysql(&$error) { @@ -98,6 +100,7 @@ class fulltext_mysql extends search_backend /** * Splits keywords entered by a user into an array of words stored in $this->split_words + * Stores the tidied search query in $this->search_query * * @param string $keywords Contains the keyword as entered by the user * @param string $terms is either 'all' or 'any' @@ -157,6 +160,8 @@ class fulltext_mysql extends search_backend } } + $this->search_query = implode(' ', $this->split_words); + if (sizeof($this->split_words)) { $this->split_words = array_values($this->split_words); @@ -637,7 +642,7 @@ class fulltext_mysql extends search_backend return $error; } - if (!is_array($this->stats)) + if (empty($this->stats)) { $this->get_stats(); } @@ -670,7 +675,7 @@ class fulltext_mysql extends search_backend return $error; } - if (!is_array($this->stats)) + if (empty($this->stats)) { $this->get_stats(); } @@ -695,7 +700,7 @@ class fulltext_mysql extends search_backend */ function index_created() { - if (!is_array($this->stats)) + if (empty($this->stats)) { $this->get_stats(); } @@ -710,7 +715,7 @@ class fulltext_mysql extends search_backend { global $user; - if (!is_array($this->stats)) + if (empty($this->stats)) { $this->get_stats(); } |