mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
parent
b8cac00366
commit
9c7109d59e
1 changed files with 10 additions and 3 deletions
|
@ -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']);
|
||||
|
|
Loading…
Add table
Reference in a new issue