mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-22 08:13:14 +02:00
[feature/soft-delete] Merge functionality of m_approve and m_restore
The problems with having two different permissions are just too big and cause huge queries, if they are granted differently. Also it's quite hard to decide what should happen when a moderator has only one permission and the topic has only posts of the two hidden types. To avoid all this, we merge them so it's a simple switch: either the user is a moderator, then he can see all posts, or he is not, then he can only see approved ones. PHPBB3-9567
This commit is contained in:
@@ -22,7 +22,6 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'topic', array(), '',
|
||||
array(
|
||||
array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
|
||||
array('m_restore', true, array(1 => true, 2 => true, 3 => true)),
|
||||
),
|
||||
array(
|
||||
array('topic_id' => 1),
|
||||
@@ -41,7 +40,6 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'topic', array(3), '',
|
||||
array(
|
||||
array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
|
||||
array('m_restore', true, array(1 => true, 2 => true, 3 => true)),
|
||||
),
|
||||
array(
|
||||
array('topic_id' => 1),
|
||||
@@ -57,13 +55,12 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'topic', array(), '',
|
||||
array(
|
||||
array('m_approve', true, array(2 => true)),
|
||||
array('m_restore', true, array(1 => true)),
|
||||
),
|
||||
array(
|
||||
array('topic_id' => 2),
|
||||
array('topic_id' => 3),
|
||||
array('topic_id' => 4),
|
||||
array('topic_id' => 5),
|
||||
array('topic_id' => 6),
|
||||
array('topic_id' => 8),
|
||||
),
|
||||
),
|
||||
@@ -72,7 +69,6 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'post', array(), '',
|
||||
array(
|
||||
array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
|
||||
array('m_restore', true, array(1 => true, 2 => true, 3 => true)),
|
||||
),
|
||||
array(
|
||||
array('post_id' => 1),
|
||||
@@ -91,7 +87,6 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'post', array(3), '',
|
||||
array(
|
||||
array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
|
||||
array('m_restore', true, array(1 => true, 2 => true, 3 => true)),
|
||||
),
|
||||
array(
|
||||
array('post_id' => 1),
|
||||
@@ -107,13 +102,12 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
|
||||
'post', array(), '',
|
||||
array(
|
||||
array('m_approve', true, array(2 => true)),
|
||||
array('m_restore', true, array(1 => true)),
|
||||
),
|
||||
array(
|
||||
array('post_id' => 2),
|
||||
array('post_id' => 3),
|
||||
array('post_id' => 4),
|
||||
array('post_id' => 5),
|
||||
array('post_id' => 6),
|
||||
array('post_id' => 8),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user