diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-12-03 15:54:13 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-12-03 15:54:13 +0100 |
commit | dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527 (patch) | |
tree | f546d5760bc1522c71cbaab7ed598d444c335ce4 /phpBB | |
parent | 3acee9a3eea8e3fdcef59876da273358a46903e8 (diff) | |
parent | fbe5193359e46aa6e28308a0d018d09785e4e9e6 (diff) | |
download | forums-dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527.tar forums-dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527.tar.gz forums-dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527.tar.bz2 forums-dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527.tar.xz forums-dfc5a2b7cd51ab688f8c1768a15b5ebd9935c527.zip |
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/log/log.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 2e20eebaac..cf3db365a4 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -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)) |