diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-10-17 15:32:57 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-10-17 15:32:57 +0200 |
commit | 0822d2bb61dda3b887911d6686a8c6db05131c47 (patch) | |
tree | ca6060a25b60b0f1c829e32838c9e9af0fa799a1 /phpBB/includes/mcp/mcp_queue.php | |
parent | 2adb37049e8c7eab5fa762a8968605a8f608aaa8 (diff) | |
download | forums-0822d2bb61dda3b887911d6686a8c6db05131c47.tar forums-0822d2bb61dda3b887911d6686a8c6db05131c47.tar.gz forums-0822d2bb61dda3b887911d6686a8c6db05131c47.tar.bz2 forums-0822d2bb61dda3b887911d6686a8c6db05131c47.tar.xz forums-0822d2bb61dda3b887911d6686a8c6db05131c47.zip |
[feature/soft-delete] Split unapproved/soft deleted posts from topics
If a topic is soft deleted through a moderator, the topic_delete_user is set.
If it is passively soft deleted (f.e. while the only approved post is deleted)
the topic_delete_user is not set. This way, we can distinguish between these
two cases. The same also applies to unapproved posts. So we need to set the
topic_delete_user when an unapproved topic is posted.
Topics that were soft deleted/unapproved by a user (rather then passive) are
going to be displayed in the Topics modules, while all others are in the posts
modules of the MCP queue.
PHPBB3-9567
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index bf34c7c53c..554a7c080b 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -335,7 +335,8 @@ class mcp_queue ' . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . ' ' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . " AND t.topic_id = p.topic_id - AND t.topic_visibility <> p.post_visibility + AND (t.topic_visibility <> p.post_visibility + OR t.topic_delete_user = 0) $limit_time_sql ORDER BY $sort_order_sql"; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); @@ -384,6 +385,7 @@ class mcp_queue FROM ' . TOPICS_TABLE . ' t WHERE ' . $db->sql_in_set('forum_id', $forum_list) . ' AND topic_visibility = ' . $visibility_const . " + AND topic_delete_user <> 0 $limit_time_sql ORDER BY $sort_order_sql"; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); |