diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-11-09 13:37:53 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-11-09 13:37:53 +0100 |
commit | 9c2a58eff4c2bd164ee3bdb2ec66729d4562963d (patch) | |
tree | de37766616cc7473b4590a77e1c660f433eab1ce /phpBB/includes/functions_posting.php | |
parent | dac798deffde15f3cb0383f5aa06a266aa9bc6cd (diff) | |
download | forums-9c2a58eff4c2bd164ee3bdb2ec66729d4562963d.tar forums-9c2a58eff4c2bd164ee3bdb2ec66729d4562963d.tar.gz forums-9c2a58eff4c2bd164ee3bdb2ec66729d4562963d.tar.bz2 forums-9c2a58eff4c2bd164ee3bdb2ec66729d4562963d.tar.xz forums-9c2a58eff4c2bd164ee3bdb2ec66729d4562963d.zip |
[feature/soft-delete] Append _approved to *_posts and *_topics column names
PHPBB3-9567
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 8e8e3aac9f..62567e302a 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -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, |