diff options
author | Nils Adermann <naderman@naderman.de> | 2010-11-20 17:00:05 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-11-20 17:00:05 +0100 |
commit | 7f21a5f46156660d7ea6a4bdb59166ac553e2be8 (patch) | |
tree | 3963b4075f58c43ffc01fe290b04a800668bc53c /phpBB/includes/mcp/mcp_main.php | |
parent | c4e02a191628b4b9f7b6340f2876607663baeb5a (diff) | |
parent | af4c2a3eb15fc4318b23dcb7794c230cf3ec2a0f (diff) | |
download | forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.gz forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.bz2 forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.xz forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.zip |
Merge commit 'release-3.0.8'
* commit 'release-3.0.8': (393 commits)
[prep-release-3.0.8] Incrementing version number to 3.0.8 and update changelog
[ticket/9903] Script for detecting potentially malicious flash bbcodes
[ticket/9904] Update WebPI Parameters.xml to work with WebMatrix.
[ticket/9899] Change recaptcha theme from default to 'clean' in the ACP.
[ticket/9509] Fix a typo and wrong period placement
[ticket/9903] Fix XSS in BBcode-parser's Flash-BBcode.
[develop-olympus] Updating changelog for last minute 3.0.8-RC1 fixes.
[ticket/9140] Check current board version in incremental update packages
[ticket/9891] Updater drops language-selection after database-update
[develop-olympus] Updating changelog with latest changes for 3.0.8-RC1
[ticket/9884] Reduce queue interval to 60 seconds, email package size to 20
[ticket/9886] Update fails on PostgreSQL because of an error in _add_module
[ticket/9888] Update fails when Bing [Bot] was already added to the users table
[develop-olympus] Bumping version number for 3.0.8-RC1.
[ticket/9885] Fix extension group name updater. Loop through all languages.
[ticket/9847] Fix typo in search synonyms. Use british english for 'judgement'.
[ticket/9883] Change an American English spelling to British English.
[task/phing-build] Correct the path for update package patch files.
[ticket/9880] Change "antibot" to "anti-spambot".
[ticket/9696] Surpress is_dir() notice when using SQLite with open_basedir.
...
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 80c3559649..d5551f5114 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1048,6 +1048,35 @@ function mcp_fork_topic($topic_ids) $total_posts = 0; $new_topic_id_list = array(); + if ($topic_data['enable_indexing']) + { + // Select the search method and do some additional checks to ensure it can actually be utilised + $search_type = basename($config['search_type']); + + if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) + { + trigger_error('NO_SUCH_SEARCH_MODULE'); + } + + if (!class_exists($search_type)) + { + include("{$phpbb_root_path}includes/search/$search_type.$phpEx"); + } + + $error = false; + $search = new $search_type($error); + $search_mode = 'post'; + + if ($error) + { + trigger_error($error); + } + } + else + { + $search_type = false; + } + foreach ($topic_data as $topic_id => $topic_row) { $sql_ary = array( @@ -1158,6 +1187,12 @@ function mcp_fork_topic($topic_ids) // Copy whether the topic is dotted markread('post', $to_forum_id, $new_topic_id, 0, $row['poster_id']); + if ($search_type) + { + $search->index($search_mode, $sql_ary['post_id'], $sql_ary['post_text'], $sql_ary['post_subject'], $sql_ary['poster_id'], ($topic_row['topic_type'] == POST_GLOBAL) ? 0 : $to_forum_id); + $search_mode = 'reply'; // After one we index replies + } + // Copy Attachments if ($row['post_attachment']) { |