aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNicofuma <github@nicofuma.fr>2014-04-26 12:47:24 +0200
committerTristan Darricau <github@nicofuma.fr>2014-05-04 15:43:08 +0200
commit1c336c355965fbe47717744e0d5fb04125d12247 (patch)
tree75d6e38ac671757c95f6287d3c3891469dd1a2dd /phpBB
parentdccc9ceeb58754dee811838d616449f0251d251b (diff)
downloadforums-1c336c355965fbe47717744e0d5fb04125d12247.tar
forums-1c336c355965fbe47717744e0d5fb04125d12247.tar.gz
forums-1c336c355965fbe47717744e0d5fb04125d12247.tar.bz2
forums-1c336c355965fbe47717744e0d5fb04125d12247.tar.xz
forums-1c336c355965fbe47717744e0d5fb04125d12247.zip
[ticket/11942] Adding the reason to hard deleted topic/post
PHPBB3-11942
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/mcp/mcp_main.php4
-rw-r--r--phpBB/language/en/acp/common.php8
-rw-r--r--phpBB/posting.php4
3 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 0343c2f631..075e49453f 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -789,7 +789,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
}
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)
{
$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
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 66dc09b071..3dec17b05d 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -539,9 +539,9 @@ $lang = array_merge($lang, array(
'LOG_APPROVE_TOPIC' => '<strong>Approved 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_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_LOCK' => '<strong>Locked topic</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_DELETED' => '<strong>Deleted report</strong><br />» %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_TOPIC' => '<strong>Soft deleted topic “%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” with the following reason</strong><br />» %3$s',
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index cfd6524e62..46ccf40e5c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1709,14 +1709,14 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof
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");
$message = $user->lang['POST_DELETED'];
}
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&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'];