mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
[ticket/11749] PHP Events for viewforum.php
PHPBB3-11749
This commit is contained in:
@@ -372,6 +372,16 @@ $sql_array = array(
|
|||||||
'LEFT_JOIN' => 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.');
|
$sql_approved = ' AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.');
|
||||||
|
|
||||||
if ($user->data['is_registered'])
|
if ($user->data['is_registered'])
|
||||||
@@ -554,6 +564,17 @@ if (sizeof($shadow_topic_list))
|
|||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . TOPICS_TABLE . '
|
FROM ' . TOPICS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list));
|
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);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
Reference in New Issue
Block a user