diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index b813f9b68c..2d44ef0271 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2385,8 +2385,14 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
if (isset($user->lang[$row['log_operation']]))
{
- // We supress the warning about inappropriate number of passed parameters here due to possible changes within LOG strings from one version to another.
- $log[$i]['action'] = @vsprintf($log[$i]['action'], $log_data_ary);
+ // Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
+ // It doesn't matter if we add more arguments than placeholders
+ if (substr_count($log[$i]['action'], '%') - sizeof($log_data_ary))
+ {
+ $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
+ }
+
+ $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
// If within the admin panel we do not censor text out
if (defined('IN_ADMIN'))
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ca97913887..7412bc1559 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -204,6 +204,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
$subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
+ $subforums[$parent_id][$forum_id]['children'] = array();
+
+ if (isset($subforums[$parent_id][$row['parent_id']]) && !$row['display_on_index'])
+ {
+ $subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id;
+ }
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
@@ -303,6 +309,14 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
{
$subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false;
+ if (!$subforum_unread && !empty($subforum_row['children']))
+ {
+ foreach ($subforum_row['children'] as $child_id)
+ {
+ $subforum_unread = (isset($forum_tracking_info[$child_id]) && $subforums[$forum_id][$child_id]['orig_forum_last_post_time'] > $forum_tracking_info[$child_id]) ? true : false;
+ }
+ }
+
if ($subforum_row['display'] && $subforum_row['name'])
{
$subforums_list[] = array(
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 71471a230c..25b003c278 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -639,7 +639,7 @@ function mcp_move_topic($topic_ids)
{
// Get the list of forums to resync, add a log entry
$forum_ids[] = $row['forum_id'];
- add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name']);
+ add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
// If we have moved a global announcement, we need to correct the topic type
if ($row['topic_type'] == POST_GLOBAL)
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index b6a985d9d6..a6df7102f0 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -480,7 +480,7 @@ $lang = array_merge($lang, array(
'LOG_LOCK' => 'Locked topic
» %s',
'LOG_LOCK_POST' => 'Locked post
» %s',
'LOG_MERGE' => 'Merged posts into topic
» %s',
- 'LOG_MOVE' => 'Moved topic
» from %s',
+ 'LOG_MOVE' => 'Moved topic
» from %1$s to %2$s',
'LOG_POST_APPROVED' => 'Approved post
» %s',
'LOG_POST_DISAPPROVED' => 'Disapproved post “%1$s” with the following reason
» %2$s',
'LOG_POST_EDITED' => 'Edited post “%1$s” written by
» %2$s',
diff --git a/phpBB/search.php b/phpBB/search.php
index 9503215a00..dafac780a6 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -476,6 +476,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_search = append_sid('search', $u_sort_param . $u_show_results);
$u_search .= ($search_id) ? '&search_id=' . $search_id : '';
$u_search .= ($u_hilit) ? '&keywords=' . urlencode(htmlspecialchars_decode($search->search_query)) : '';
+ $u_search .= ($search_terms != 'all') ? '&terms=' . $search_terms : '';
$u_search .= ($topic_id) ? '&t=' . $topic_id : '';
$u_search .= ($author) ? '&author=' . urlencode(htmlspecialchars_decode($author)) : '';
$u_search .= ($author_id) ? '&author_id=' . $author_id : '';
@@ -542,7 +543,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($user->data['is_registered'])
{
- if ($config['load_db_track'])
+ if ($config['load_db_track'] && $author_id !== $user->data['user_id'])
{
$sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.user_id = ' . $user->data['user_id'] . '
AND t.topic_id = tp.topic_id)';
@@ -772,6 +773,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($show_results == 'topics')
{
+ if ($config['load_db_track'] && $author_id === $user->data['user_id'])
+ {
+ $row['topic_posted'] = 1;
+ }
+
$folder_img = $folder_alt = $topic_type = '';
topic_status($row, $replies, (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false, $folder_img, $folder_alt, $topic_type);