diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 5739223392..8b0498f188 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -131,6 +131,7 @@
  • [Change] Do not count queued posts to user_posts.
  • [Change] Allow setting birth year to current year.
  • [Change] Do not use the topics posted table when performing an egosearch.
  • +
  • [Change] Log the forum name that topics are moved into.
  • [Feature] Allow limited inheritance for template sets.
  • [Feature] Allow hard disabling of the template editor.
  • diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 96deda9f3f..0349cbc6a8 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2398,8 +2398,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/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 814add5aa8..1b6a26dc07 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -641,7 +641,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 256898c2c1..06b30cf03b 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -479,7 +479,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',