mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10073] Global announcements have a forum_id now
PHPBB3-10073
This commit is contained in:
parent
ea9756917e
commit
af024ea3e5
1 changed files with 5 additions and 24 deletions
|
@ -48,33 +48,14 @@ class topic_form extends form
|
||||||
return 'NO_TOPIC';
|
return 'NO_TOPIC';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
if (!$this->auth->acl_get('f_read', $this->topic_row['forum_id']))
|
||||||
* @todo remove else case when global topics have forum id
|
|
||||||
*/
|
|
||||||
if ($this->topic_row['forum_id'])
|
|
||||||
{
|
{
|
||||||
if (!$this->auth->acl_get('f_read', $this->topic_row['forum_id']))
|
return 'SORRY_AUTH_READ';
|
||||||
{
|
|
||||||
return 'SORRY_AUTH_READ';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->auth->acl_get('f_email', $this->topic_row['forum_id']))
|
|
||||||
{
|
|
||||||
return 'NO_EMAIL';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If global announcement, we need to check if the user is able to at least read and email in one forum...
|
|
||||||
if (!$this->auth->acl_getf_global('f_read'))
|
|
||||||
{
|
|
||||||
return 'SORRY_AUTH_READ';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->auth->acl_getf_global('f_email'))
|
if (!$this->auth->acl_get('f_email', $this->topic_row['forum_id']))
|
||||||
{
|
{
|
||||||
return 'NO_EMAIL';
|
return 'NO_EMAIL';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue