1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 01:20:40 +01:00

Merge branch '3.1.x' into 3.2.x

This commit is contained in:
Marc Alexander 2016-12-03 15:54:13 +01:00
commit dfc5a2b7cd
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -898,9 +898,29 @@ class log implements \phpbb\log\log_interface
$forum_auth = array('f_read' => array(), 'm_' => array());
$topic_ids = array_unique($topic_ids);
$sql = 'SELECT topic_id, forum_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $this->db->sql_in_set('topic_id', array_map('intval', $topic_ids));
$sql_ary = array(
'SELECT' => 'topic_id, forum_id',
'FROM' => array(
TOPICS_TABLE => 't',
),
'WHERE' => $this->db->sql_in_set('topic_id', array_map('intval', $topic_ids)),
);
/**
* Allow modifying SQL query before topic data is retrieved.
*
* @event core.phpbb_log_get_topic_auth_sql_before
* @var array topic_ids Array with unique topic IDs
* @var array sql_ary SQL array
* @since 3.1.11-RC1
*/
$vars = array(
'topic_ids',
'sql_ary',
);
extract($this->dispatcher->trigger_event('core.phpbb_log_get_topic_auth_sql_before', compact($vars)));
$sql = $this->db->sql_build_query('SELECT', $sql_ary);
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))