mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
b85c8afabb
1 changed files with 23 additions and 3 deletions
|
@ -898,9 +898,29 @@ class log implements \phpbb\log\log_interface
|
||||||
$forum_auth = array('f_read' => array(), 'm_' => array());
|
$forum_auth = array('f_read' => array(), 'm_' => array());
|
||||||
$topic_ids = array_unique($topic_ids);
|
$topic_ids = array_unique($topic_ids);
|
||||||
|
|
||||||
$sql = 'SELECT topic_id, forum_id
|
$sql_ary = array(
|
||||||
FROM ' . TOPICS_TABLE . '
|
'SELECT' => 'topic_id, forum_id',
|
||||||
WHERE ' . $this->db->sql_in_set('topic_id', array_map('intval', $topic_ids));
|
'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);
|
$result = $this->db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
|
|
Loading…
Add table
Reference in a new issue