mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-12 11:40:26 +01:00
[ticket/15925] Add core.sync_modify_topic_data
Allow modification of topic_data when syncing topics Another event has been added to modify the contents of $row This means that topic_data can be populated with anything added to that query PHPBB3-15925
This commit is contained in:
parent
9ff92f2c36
commit
40d825d1c6
@ -2118,6 +2118,22 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the topic_data when syncing topics
|
||||
*
|
||||
* @event core.sync_modify_topic_data
|
||||
* @var array topic_data Array with the topics' data we are syncing
|
||||
* @var array row Array with some of the current user and post data
|
||||
* @var int topic_id The current topic_id of $row
|
||||
* @since 3.2.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'topic_data',
|
||||
'row',
|
||||
'topic_id',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars)));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user