mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
note correct username if post/topic get's removed if user is anonymous
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10170 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4006def79d
commit
8da2b69e2b
1 changed files with 3 additions and 2 deletions
|
@ -1569,17 +1569,18 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
|
||||||
);
|
);
|
||||||
|
|
||||||
$next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
|
$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)
|
if ($next_post_id === false)
|
||||||
{
|
{
|
||||||
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_data['username']);
|
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");
|
$meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
|
||||||
$message = $user->lang['POST_DELETED'];
|
$message = $user->lang['POST_DELETED'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_data['username']);
|
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";
|
$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>');
|
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
|
||||||
|
|
Loading…
Add table
Reference in a new issue