diff options
author | Matt Friedman <maf675@gmail.com> | 2013-07-27 10:45:40 -0700 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2013-07-27 10:45:40 -0700 |
commit | 9ffb150d47d3db42c1816ffa662e73046a1b5d03 (patch) | |
tree | 3327f62017ba613fa652252cd542bbb9455a29e6 /phpBB/viewforum.php | |
parent | 9e68404de5277de23baa153a29f4a3825e233e1e (diff) | |
download | forums-9ffb150d47d3db42c1816ffa662e73046a1b5d03.tar forums-9ffb150d47d3db42c1816ffa662e73046a1b5d03.tar.gz forums-9ffb150d47d3db42c1816ffa662e73046a1b5d03.tar.bz2 forums-9ffb150d47d3db42c1816ffa662e73046a1b5d03.tar.xz forums-9ffb150d47d3db42c1816ffa662e73046a1b5d03.zip |
[ticket/11749] PHP Events for viewforum.php
PHPBB3-11749
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 5a59e021b3..1fa2030671 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -372,6 +372,16 @@ $sql_array = array( 'LEFT_JOIN' => array(), ); +/** +* Event to modify the SQL query before the topic data is retrieved +* +* @event core.viewforum_get_topic_data +* @var array sql_array The SQL array to get the data of all topics +* @since 3.1-A1 +*/ +$vars = array('sql_array'); +extract($phpbb_dispatcher->trigger_event('core.viewforum_get_topic_data', compact($vars))); + $sql_approved = ' AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'); if ($user->data['is_registered']) @@ -554,6 +564,17 @@ if (sizeof($shadow_topic_list)) $sql = 'SELECT * FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list)); + + /** + * Event to modify the SQL query before the shadowtopic data is retrieved + * + * @event core.viewforum_get_shadowtopic_data + * @var string sql The SQL string to get the data of any shadowtopics + * @since 3.1-A1 + */ + $vars = array('sql'); + extract($phpbb_dispatcher->trigger_event('core.viewforum_get_shadowtopic_data', compact($vars))); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) |