diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2012-10-09 17:38:08 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-10-09 17:38:08 +0200 |
| commit | 70fa983fa804c2a826a51af1c31ffc663cde48b3 (patch) | |
| tree | e181aee8d16e8cd7bc2333c82c444ebb274b9a66 /phpBB/posting.php | |
| parent | fbf85b76c15c27e478f24947098d56c8c4bb3435 (diff) | |
| download | forums-70fa983fa804c2a826a51af1c31ffc663cde48b3.tar forums-70fa983fa804c2a826a51af1c31ffc663cde48b3.tar.gz forums-70fa983fa804c2a826a51af1c31ffc663cde48b3.tar.bz2 forums-70fa983fa804c2a826a51af1c31ffc663cde48b3.tar.xz forums-70fa983fa804c2a826a51af1c31ffc663cde48b3.zip | |
[feature/soft-delete] Do not allow users to reply to soft deleted topics
We should discuss this in an RFC again, but for now, we just fix the old state.
So moderators can only reply, when the topic is approved.
Also fixes a bug in the visibility check. We need to check the posts visibility
rather then the visibility of the topic. Because when the post is visible, the
topic is as well, but not the other way round.
PHPBB3-9567
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index f4a6df3200..9f0b0d2eb9 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -128,7 +128,7 @@ switch ($mode) AND t.topic_id = p.topic_id AND u.user_id = p.poster_id AND f.forum_id = t.forum_id - AND " . phpbb_content_visibility::get_visibility_sql('topic', $forum_id, 't.'); + AND " . phpbb_content_visibility::get_visibility_sql('post', $forum_id, 'p.'); break; case 'smilies': @@ -176,7 +176,7 @@ if (!$post_data) // Not able to reply to unapproved posts/topics // TODO: add more descriptive language key -if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] == ITEM_UNAPPROVED) || ($mode == 'quote' && $post_data['post_visibility'] == ITEM_UNAPPROVED))) +if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] != ITEM_APPROVED) || ($mode == 'quote' && $post_data['post_visibility'] != ITEM_APPROVED))) { trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED'); } |
