mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +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
@@ -475,7 +475,7 @@ function mcp_move_topic($topic_ids)
|
||||
|
||||
foreach ($topic_data as $topic_id => $topic_info)
|
||||
{
|
||||
if ($topic_info['topic_approved'])
|
||||
if ($topic_info['topic_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topics_authed_moved++;
|
||||
$topic_posts_added++;
|
||||
@@ -486,7 +486,7 @@ function mcp_move_topic($topic_ids)
|
||||
$topics_removed++;
|
||||
$topic_posts_removed += $topic_info['topic_replies'];
|
||||
|
||||
if ($topic_info['topic_approved'])
|
||||
if ($topic_info['topic_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topics_authed_removed++;
|
||||
$topic_posts_removed++;
|
||||
@@ -528,13 +528,13 @@ function mcp_move_topic($topic_ids)
|
||||
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
|
||||
|
||||
// Leave a redirection if required and only if the topic is visible to users
|
||||
if ($leave_shadow && $row['topic_approved'] && $row['topic_type'] != POST_GLOBAL)
|
||||
if ($leave_shadow && $row['topic_visibility'] == ITEM_APPROVED && $row['topic_type'] != POST_GLOBAL)
|
||||
{
|
||||
$shadow = array(
|
||||
'forum_id' => (int) $row['forum_id'],
|
||||
'icon_id' => (int) $row['icon_id'],
|
||||
'topic_attachment' => (int) $row['topic_attachment'],
|
||||
'topic_approved' => 1, // a shadow topic is always approved
|
||||
'topic_visibliity' => ITEM_APPROVED, // a shadow topic is always approved
|
||||
'topic_reported' => 0, // a shadow topic is never reported
|
||||
'topic_title' => (string) $row['topic_title'],
|
||||
'topic_poster' => (int) $row['topic_poster'],
|
||||
@@ -932,7 +932,7 @@ function mcp_fork_topic($topic_ids)
|
||||
'forum_id' => (int) $to_forum_id,
|
||||
'icon_id' => (int) $topic_row['icon_id'],
|
||||
'topic_attachment' => (int) $topic_row['topic_attachment'],
|
||||
'topic_approved' => 1,
|
||||
'topic_visibility' => ITEM_APPROVED,
|
||||
'topic_reported' => 0,
|
||||
'topic_title' => (string) $topic_row['topic_title'],
|
||||
'topic_poster' => (int) $topic_row['topic_poster'],
|
||||
@@ -1009,7 +1009,7 @@ function mcp_fork_topic($topic_ids)
|
||||
'icon_id' => (int) $row['icon_id'],
|
||||
'poster_ip' => (string) $row['poster_ip'],
|
||||
'post_time' => (int) $row['post_time'],
|
||||
'post_approved' => 1,
|
||||
'post_visibility' => ITEM_APPROVED,
|
||||
'post_reported' => 0,
|
||||
'enable_bbcode' => (int) $row['enable_bbcode'],
|
||||
'enable_smilies' => (int) $row['enable_smilies'],
|
||||
|
Reference in New Issue
Block a user