aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-01-11 18:56:07 +0000
committerNils Adermann <naderman@naderman.de>2006-01-11 18:56:07 +0000
commit0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007 (patch)
tree5cd57f820281c20c6936433d92483cc4712a7ab7 /phpBB/posting.php
parent9ea5fa1768feebfb04f2303788eb4c685161e3dd (diff)
downloadforums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.gz
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.bz2
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.xz
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.zip
- overhauled search system
- updated structure for search backend plugins - better result caching using ACM - search results no longer session restricted => link to them by copying the URL :) - in-topic search - indexing posts now uses search backend plugins - develop/search_fill.php working again - fulltext_mysql not working yet - tiny bugfixes to ACM git-svn-id: file:///svn/phpbb/trunk@5441 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php23
1 files changed, 20 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 54427e6e0d..b798f5c119 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1812,11 +1812,28 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
WHERE topic_moved_id = ' . $data['topic_id']);
}
- // Fulltext parse
+ // Index message contents
if ($update_message && $data['enable_indexing'])
{
- $search = new fulltext_search();
- $result = $search->add($mode, $data['post_id'], $data['message'], $subject);
+ // Select the search method and do some additional checks to ensure it can actually be utilised
+ $search_type = $config['search_type'];
+
+ if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+
+ $error = false;
+ $search = new $search_type($error);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ $search->index($mode, $data['post_id'], $data['message'], $subject);
}
$db->sql_transaction('commit');