diff options
author | Josh Woody <a_jelly_doughnut@phpbb.com> | 2010-06-17 23:58:18 -0500 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-08-29 17:49:37 +0200 |
commit | b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd (patch) | |
tree | 1fc8b7f01084dc64243476683de5587278406110 /phpBB/mcp.php | |
parent | 1128ff1e580361db7f7ecc72d496fdd347cbe0f2 (diff) | |
download | forums-b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd.tar forums-b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd.tar.gz forums-b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd.tar.bz2 forums-b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd.tar.xz forums-b8c55291ed7ed86565be2bc651bf20eb1a9ed4dd.zip |
[feature/soft-delete] Lay the groundwork for a soft-delete feature
So far, I've added no new functionality. The biggest change here is adjusting the DB column names to "visibility" rather than "approved". Some things here are pretty likely to change, for example the name and location of the topic_visibility class. Happy birthday phpBB :)
PHPBB3-9657
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r-- | phpBB/mcp.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php index d04a297cf9..984925789f 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -483,7 +483,7 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false) continue; } - if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id'])) + if ($row['post_visibility'] == ITEM_UNAPPROVED && !$auth->acl_get('m_approve', $row['forum_id'])) { // Moderators without the permission to approve post should at least not see them. ;) continue; @@ -619,7 +619,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, if (!$auth->acl_get('m_approve', $forum_id)) { - $sql .= 'AND topic_approved = 1'; + $sql .= 'AND post_visibility = ' . ITEM_APPROVED; } break; @@ -635,7 +635,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, if (!$auth->acl_get('m_approve', $forum_id)) { - $sql .= 'AND post_approved = 1'; + $sql .= 'AND post_visibility = ' . ITEM_APPROVED; } break; @@ -648,7 +648,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, $sql = 'SELECT COUNT(p.post_id) AS total FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t $where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . ' - AND p.post_approved = 0 + AND p.post_visibility = ' . ITEM_UNAPPROVED . ' AND t.topic_id = p.topic_id AND t.topic_first_post_id <> p.post_id'; @@ -666,7 +666,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, $sql = 'SELECT COUNT(topic_id) AS total FROM ' . TOPICS_TABLE . " $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . ' - AND topic_approved = 0'; + AND topic_visibility = ' . ITEM_UNAPPROVED; if ($min_time) { |