mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[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
This commit is contained in:
committed by
Joas Schilling
parent
1128ff1e58
commit
b8c55291ed
@@ -314,7 +314,7 @@ class acp_forums
|
||||
$end = $start + $batch_size;
|
||||
|
||||
// Sync all topics in batch mode...
|
||||
sync('topic_approved', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
|
||||
sync('topic_visibility', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
|
||||
sync('topic', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, true);
|
||||
|
||||
if ($end < $row2['max_topic_id'])
|
||||
@@ -1793,7 +1793,7 @@ class acp_forums
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id . '
|
||||
AND post_postcount = 1
|
||||
AND post_approved = 1';
|
||||
AND post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$post_counts = array();
|
||||
@@ -1931,7 +1931,7 @@ class acp_forums
|
||||
// Make sure the overall post/topic count is correct...
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_approved = 1';
|
||||
WHERE post_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
@@ -1940,7 +1940,7 @@ class acp_forums
|
||||
|
||||
$sql = 'SELECT COUNT(topic_id) AS stat
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_approved = 1';
|
||||
WHERE topic_visibility = ' . ITEM_APPROVED;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
Reference in New Issue
Block a user