diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/events.md | 16 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_forum.php | 8 | ||||
-rw-r--r-- | phpBB/includes/message_parser.php | 2 | ||||
-rw-r--r-- | phpBB/search.php | 9 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/mcp_forum.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/mcp_forum.html | 2 |
6 files changed, 35 insertions, 4 deletions
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index e556193fdf..35c6877a89 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -794,6 +794,22 @@ mcp_ban_unban_before * Since: 3.1.0-RC3 * Purpose: Add additional fields to the unban form in MCP +mcp_forum_actions_after +=== +* Locations: + + styles/prosilver/template/mcp_forum.html + + styles/subsilver2/template/mcp_forum.html +* Since: 3.1.11-RC1 +* Purpose: Add some information after actions fieldset + +mcp_forum_actions_before +=== +* Locations: + + styles/prosilver/template/mcp_forum.html + + styles/subsilver2/template/mcp_forum.html +* Since: 3.1.11-RC1 +* Purpose: Add some information before actions fieldset + mcp_forum_topic_title_before === * Locations: diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 9573ecbe0d..7df712f65f 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -420,9 +420,11 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) } $sync_forums = array(); + $topic_views = 0; foreach ($topic_data as $data) { $sync_forums[$data['forum_id']] = $data['forum_id']; + $topic_views += $data['topic_views']; } $topic_data = $topic_data[$to_topic_id]; @@ -478,6 +480,12 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) move_posts($post_id_list, $to_topic_id, false); add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']); + // Update topic views count + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_views = ' . $topic_views . ' + WHERE topic_id = ' . $to_topic_id; + $db->sql_query($sql); + // Message and return links $success_msg = 'POSTS_MERGED_SUCCESS'; diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index e63f6b822b..16b65fb83e 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1822,7 +1822,7 @@ class parse_message extends bbcode_firstpass $this->message = $poll['poll_title']; $this->bbcode_bitfield = $bbcode_bitfield; - $poll['poll_options'] = explode("\n", trim($poll['poll_option_text'])); + $poll['poll_options'] = preg_split('/\s*?\n\s*/', trim($poll['poll_option_text'])); $poll['poll_options_size'] = sizeof($poll['poll_options']); if (!$poll['poll_title'] && $poll['poll_options_size']) diff --git a/phpBB/search.php b/phpBB/search.php index 03575f7e0b..27ec8e4dab 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -690,8 +690,10 @@ if ($keywords || $author || $author_id || $search_id || $submit) * @var string show_results String indicating the show results mode * @var string sql_where The SQL WHERE string used by search to get topic data * @var int total_match_count The total number of search matches + * @var array ex_fid_ary Array of excluded forum ids * @since 3.1.7-RC1 * @changed 3.1.10-RC1 Added show_results, sql_where, total_match_count + * @changed 3.1.11-RC1 Added ex_fid_ary */ $vars = array( 'u_search', @@ -699,6 +701,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'show_results', 'sql_where', 'total_match_count', + 'ex_fid_ary', ); extract($phpbb_dispatcher->trigger_event('core.search_modify_url_parameters', compact($vars))); @@ -1060,7 +1063,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : ''; $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&mode=deleted_topics&t=$result_topic_id", true, $user->session_id) : $u_mcp_queue; - $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']); + $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['topic_title']); $tpl_ary = array( 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), @@ -1143,8 +1146,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) if ($hilit) { // post highlighting - $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']); - $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']); + $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_text']); + $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_subject']); } $tpl_ary = array( diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index 3033ef799c..5858a2c801 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -120,6 +120,7 @@ </div> </div> +<!-- EVENT mcp_forum_actions_before --> <fieldset class="display-actions"> <!-- IF not S_MERGE_SELECT --> <select name="action"> @@ -143,6 +144,7 @@ <!-- ENDIF --> {S_FORM_TOKEN} </fieldset> +<!-- EVENT mcp_forum_actions_after --> </form> <!-- INCLUDE mcp_footer.html --> diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html index ba4f16bb95..d905910c22 100644 --- a/phpBB/styles/subsilver2/template/mcp_forum.html +++ b/phpBB/styles/subsilver2/template/mcp_forum.html @@ -58,6 +58,7 @@ <td class="row1" colspan="8" align="center"><p class="gen">{L_NO_TOPICS}</p></td> </tr> <!-- END topicrow --> +<!-- EVENT mcp_forum_actions_before --> <!-- IF not S_MERGE_SELECT --> <tr> <td class="cat" colspan="6" align="{S_CONTENT_FLOW_END}"> @@ -81,6 +82,7 @@ </td> </tr> <!-- ENDIF --> +<!-- EVENT mcp_forum_actions_after --> </table> {S_FORM_TOKEN} </form> |