diff options
Diffstat (limited to 'phpBB/includes/mcp/mcp_post.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index b2b0ceb419..a1cc7f4331 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -385,6 +385,23 @@ function change_poster(&$post_info, $userdata) $db->sql_query($sql); } + // refresh search cache of this post + $search_type = basename($config['search_type']); + + if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) + { + require("{$phpbb_root_path}includes/search/$search_type.$phpEx"); + + // We do some additional checks in the module to ensure it can actually be utilised + $error = false; + $search = new $search_type($error); + + if (!$error && method_exists($search, 'destroy_cache')) + { + $search->destroy_cache(array(), array($post_info['user_id'], $userdata['user_id'])); + } + } + $from_username = $post_info['username']; $to_username = $userdata['username']; |