mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11942] Adding the reason to hard deleted topic/post
PHPBB3-11942
This commit is contained in:
parent
dccc9ceeb5
commit
1c336c3559
3 changed files with 8 additions and 8 deletions
|
@ -789,7 +789,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
|
add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name'], $soft_delete_reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -987,7 +987,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||||
foreach ($post_data as $id => $row)
|
foreach ($post_data as $id => $row)
|
||||||
{
|
{
|
||||||
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
|
$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);
|
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username, $soft_delete_reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now delete the posts, topics and forums are automatically resync'ed
|
// Now delete the posts, topics and forums are automatically resync'ed
|
||||||
|
|
|
@ -539,9 +539,9 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'LOG_APPROVE_TOPIC' => '<strong>Approved topic</strong><br />» %s',
|
'LOG_APPROVE_TOPIC' => '<strong>Approved topic</strong><br />» %s',
|
||||||
'LOG_BUMP_TOPIC' => '<strong>User bumped topic</strong><br />» %s',
|
'LOG_BUMP_TOPIC' => '<strong>User bumped topic</strong><br />» %s',
|
||||||
'LOG_DELETE_POST' => '<strong>Deleted post “%1$s” written by</strong><br />» %2$s',
|
'LOG_DELETE_POST' => '<strong>Deleted post “%1$s” written by “%2$s” with the following reason</strong><br />» %3$s',
|
||||||
'LOG_DELETE_SHADOW_TOPIC' => '<strong>Deleted shadow topic</strong><br />» %s',
|
'LOG_DELETE_SHADOW_TOPIC' => '<strong>Deleted shadow topic</strong><br />» %s',
|
||||||
'LOG_DELETE_TOPIC' => '<strong>Deleted topic “%1$s” written by</strong><br />» %2$s',
|
'LOG_DELETE_TOPIC' => '<strong>Deleted topic “%1$s” written by “%2$s” with the following reason</strong><br />» %3$s',
|
||||||
'LOG_FORK' => '<strong>Copied topic</strong><br />» from %s',
|
'LOG_FORK' => '<strong>Copied topic</strong><br />» from %s',
|
||||||
'LOG_LOCK' => '<strong>Locked topic</strong><br />» %s',
|
'LOG_LOCK' => '<strong>Locked topic</strong><br />» %s',
|
||||||
'LOG_LOCK_POST' => '<strong>Locked post</strong><br />» %s',
|
'LOG_LOCK_POST' => '<strong>Locked post</strong><br />» %s',
|
||||||
|
@ -556,8 +556,8 @@ $lang = array_merge($lang, array(
|
||||||
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
|
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
|
||||||
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
|
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
|
||||||
'LOG_RESTORE_TOPIC' => '<strong>Restored topic “%1$s” written by</strong><br />» %2$s',
|
'LOG_RESTORE_TOPIC' => '<strong>Restored topic “%1$s” written by</strong><br />» %2$s',
|
||||||
'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by “%2$s”</strong><br />» %3$s',
|
'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by “%2$s” with the following reason</strong><br />» %3$s',
|
||||||
'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by “%2$s”</strong><br />» %3$s',
|
'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by “%2$s” with the following reason</strong><br />» %3$s',
|
||||||
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
|
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
|
||||||
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
|
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
|
||||||
|
|
||||||
|
|
|
@ -1709,14 +1709,14 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof
|
||||||
|
|
||||||
if ($next_post_id === false)
|
if ($next_post_id === false)
|
||||||
{
|
{
|
||||||
add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username);
|
add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username, $soft_delete_reason);
|
||||||
|
|
||||||
$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, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username);
|
add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username, $soft_delete_reason);
|
||||||
|
|
||||||
$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'];
|
$message = $user->lang['POST_DELETED'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue