Author: acydburn
Date: Sun Sep 20 18:08:16 2009
New Revision: 10170
Log:
note correct username if post/topic get's removed if user is anonymous
Modified:
branches/phpBB-3_0_0/phpBB/posting.php
Modified: branches/phpBB-3_0_0/phpBB/posting.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/posting.php (original)
--- branches/phpBB-3_0_0/phpBB/posting.php Sun Sep 20 18:08:16 2009
***************
*** 1569,1585 ****
);
$next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
if ($next_post_id === false)
{
! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_data['username']);
$meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
$message = $user->lang['POST_DELETED'];
}
else
{
! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_data['username']);
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
--- 1569,1586 ----
);
$next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
+ $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
if ($next_post_id === false)
{
! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
$message = $user->lang['POST_DELETED'];
}
else
{
! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
|