mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 16:27:38 +02:00
[feature/soft-delete] Append _approved to *_posts and *_topics column names
PHPBB3-9567
This commit is contained in:
@@ -1418,7 +1418,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||
|
||||
// Specify our post mode
|
||||
$post_mode = 'delete';
|
||||
if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && ($data['topic_posts'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1))
|
||||
if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1))
|
||||
{
|
||||
$post_mode = 'delete_topic';
|
||||
}
|
||||
@@ -1718,7 +1718,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
}
|
||||
else if ($mode == 'edit')
|
||||
{
|
||||
$post_mode = ($data['topic_posts'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
|
||||
$post_mode = ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
|
||||
}
|
||||
|
||||
// First of all make sure the subject and topic title are having the correct length.
|
||||
@@ -1879,8 +1879,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'topic_last_view_time' => $current_time,
|
||||
'forum_id' => $data['forum_id'],
|
||||
'icon_id' => $data['icon_id'],
|
||||
'topic_posts' => ($post_visibility == ITEM_APPROVED) ? 1 : 0,
|
||||
'topic_posts_softdeleted' => ($post_visibility != ITEM_APPROVED) ? 1 : 0,
|
||||
'topic_posts_approved' => ($post_visibility == ITEM_APPROVED) ? 1 : 0,
|
||||
'topic_posts_softdeleted' => ($post_visibility == ITEM_DELETED) ? 1 : 0,
|
||||
'topic_posts_unapproved' => ($post_visibility == ITEM_UNAPPROVED) ? 1 : 0,
|
||||
'topic_visibility' => $post_visibility,
|
||||
'topic_delete_user' => ($post_visibility != ITEM_APPROVED) ? (int) $user->data['user_id'] : 0,
|
||||
'topic_title' => $subject,
|
||||
|
Reference in New Issue
Block a user