1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

- 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
This commit is contained in:
Nils Adermann
2006-07-27 19:02:47 +00:00
parent 412cf50689
commit 007f4f6987
12 changed files with 1028 additions and 2111 deletions

View File

@@ -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();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -33,8 +33,6 @@ class search_backend
var $ignore_words = array();
var $match_synonym = array();
var $replace_synonym = array();
var $split_words = array();
var $common_words = array();
function search_backend(&$error)
{