From d657c05ed5dd3bd035b2b8edc26f6045120bca7d Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 29 Sep 2009 14:51:58 +0000 Subject: [PATCH] Fix Bug #52125, regression from r9678 for Bug #46225 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10196 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_main.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 6c2ac0b521..50b05e989f 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -813,7 +813,14 @@ function mcp_delete_topic($topic_ids) foreach ($data as $topic_id => $row) { - add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_' . ($row['topic_moved_id'] ? 'SHADOW_' : '') . 'TOPIC', $row['topic_title']); + if ($row['topic_moved_id']) + { + add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_SHADOW_TOPIC', $row['topic_title']); + } + else + { + add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']); + } } $return = delete_topics('topic_id', $topic_ids); @@ -897,7 +904,8 @@ function mcp_delete_post($post_ids) foreach ($post_data as $id => $row) { - add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject']); + $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username']; + add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username); } // Now delete the posts, topics and forums are automatically resync'ed