1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 08:12:17 +02:00

[ticket/15476] Add event core.search_modify_post_row

PHPBB3-15476
This commit is contained in:
kasimi 2017-12-09 15:40:55 +01:00
parent 2c01fe67e9
commit 3083dd997b
No known key found for this signature in database
GPG Key ID: 3163AB573241193A

View File

@ -932,6 +932,26 @@ if ($keywords || $author || $author_id || $search_id || $submit)
while ($row = $db->sql_fetchrow($result))
{
/**
* Modify the row of a post result before the post_text is trimmed
*
* @event core.search_modify_post_row
* @var string hilit String to highlight
* @var array row Array with the post data
* @var string u_hilit Highlight string to be injected into URL
* @var string view Search results view mode
* @var array zebra Array with zebra data for the current user
* @since 3.2.2-RC1
*/
$vars = array(
'hilit',
'row',
'u_hilit',
'view',
'zebra',
);
extract($phpbb_dispatcher->trigger_event('core.search_modify_post_row', compact($vars)));
// We pre-process some variables here for later usage
$row['post_text'] = censor_text($row['post_text']);