mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-24 20:28:51 +00:00
[ticket/13147] Allow changing the result of calling get_global_visibility_sql
PHPBB3-13147
This commit is contained in:
parent
67c987f0d0
commit
8f5e3d5efb
1 changed files with 20 additions and 0 deletions
|
@ -244,6 +244,26 @@ class content_visibility
|
||||||
|
|
||||||
$approve_forums = array_diff(array_keys($this->auth->acl_getf('m_approve', true)), $exclude_forum_ids);
|
$approve_forums = array_diff(array_keys($this->auth->acl_getf('m_approve', true)), $exclude_forum_ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow changing the result of calling get_global_visibility_sql
|
||||||
|
*
|
||||||
|
* @event core.phpbb_content_visibility_get_global_visibility_before
|
||||||
|
* @var array where_sqls The action the user tried to execute
|
||||||
|
* @var string mode Either "topic" or "post" depending on the query this is being used in
|
||||||
|
* @var array forum_ids Array of forum ids which the posts/topics are limited to
|
||||||
|
* @var string table_alias Table alias to prefix in SQL queries
|
||||||
|
* @var array approve_forums Array of forums where the user has m_approve permissions
|
||||||
|
* @since 3.1.3-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'where_sqls',
|
||||||
|
'mode',
|
||||||
|
'forum_ids',
|
||||||
|
'table_alias',
|
||||||
|
'approve_forums',
|
||||||
|
);
|
||||||
|
extract($this->phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_global_visibility_before', compact($vars)));
|
||||||
|
|
||||||
if (sizeof($exclude_forum_ids))
|
if (sizeof($exclude_forum_ids))
|
||||||
{
|
{
|
||||||
$where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true) . '
|
$where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true) . '
|
||||||
|
|
Loading…
Add table
Reference in a new issue