aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-09-23 12:01:26 +0000
committerChris Smith <toonarmy@phpbb.com>2008-09-23 12:01:26 +0000
commit687da94982f5d6f8c3290893d40ed84b02f54a37 (patch)
tree4a61a3bee409a1e161f011772499e387ef1bfa08 /phpBB/includes/functions_admin.php
parenta1b7a5f8a3886de6408def501869fa492a68fe5d (diff)
downloadforums-687da94982f5d6f8c3290893d40ed84b02f54a37.tar
forums-687da94982f5d6f8c3290893d40ed84b02f54a37.tar.gz
forums-687da94982f5d6f8c3290893d40ed84b02f54a37.tar.bz2
forums-687da94982f5d6f8c3290893d40ed84b02f54a37.tar.xz
forums-687da94982f5d6f8c3290893d40ed84b02f54a37.zip
Log the forum name that topics are moved into.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8908 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php10
1 files changed, 8 insertions, 2 deletions
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'))