diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-11-03 15:03:14 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-11-03 15:03:14 +0000 |
commit | 9c7109d59e8d603208da0fcae3060d731f09ea42 (patch) | |
tree | eb20034025bd21850075c185ccd4ca7919a728e8 /phpBB | |
parent | b8cac003660894a3000430ab0004ec7d1fd55bdf (diff) | |
download | forums-9c7109d59e8d603208da0fcae3060d731f09ea42.tar forums-9c7109d59e8d603208da0fcae3060d731f09ea42.tar.gz forums-9c7109d59e8d603208da0fcae3060d731f09ea42.tar.bz2 forums-9c7109d59e8d603208da0fcae3060d731f09ea42.tar.xz forums-9c7109d59e8d603208da0fcae3060d731f09ea42.zip |
This is not perfect... i know, but at least it gives out more information than a simple "this topic/post does not exist". ;)
Related to r9971
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10253 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/posting.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 1c7cd95b81..f5d1346865 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -95,8 +95,8 @@ switch ($mode) FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f WHERE t.topic_id = $topic_id AND (f.forum_id = t.forum_id - OR f.forum_id = $forum_id) - AND t.topic_approved = 1"; + OR f.forum_id = $forum_id)" . + (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1'); break; case 'quote': @@ -125,7 +125,7 @@ switch ($mode) AND u.user_id = p.poster_id AND (f.forum_id = t.forum_id OR f.forum_id = $forum_id)" . - (($auth->acl_get('m_approve', $forum_id) && $mode != 'quote') ? '' : 'AND p.post_approved = 1'); + (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1'); break; case 'smilies': @@ -171,6 +171,13 @@ if (!$post_data) trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST'); } +// 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_approved']) || ($mode == 'quote' && !$post_data['post_approved']))) +{ + trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED'); +} + if ($mode == 'popup') { upload_popup($post_data['forum_style']); |