aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_admin.php10
-rw-r--r--phpBB/includes/functions_display.php14
-rw-r--r--phpBB/includes/mcp/mcp_main.php2
3 files changed, 23 insertions, 3 deletions
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)