mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11749] PHP Events for viewforum.php
PHPBB3-11749
This commit is contained in:
parent
9e68404de5
commit
9ffb150d47
1 changed files with 21 additions and 0 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Reference in a new issue