aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-12-17 21:37:50 +0100
committerMarc Alexander <admin@m-a-styles.de>2017-12-17 21:37:50 +0100
commit6d864a9df594accb82dc437f80d76aea67db71a6 (patch)
treeed39f1ce9f439ccbe6d4fc0fe17bc5747902f7c6
parent751de0c2e9c3a5ad93beef6098cf14db88ebd43e (diff)
parent3083dd997b0064fbaa7893ce79677da629f326c3 (diff)
downloadforums-6d864a9df594accb82dc437f80d76aea67db71a6.tar
forums-6d864a9df594accb82dc437f80d76aea67db71a6.tar.gz
forums-6d864a9df594accb82dc437f80d76aea67db71a6.tar.bz2
forums-6d864a9df594accb82dc437f80d76aea67db71a6.tar.xz
forums-6d864a9df594accb82dc437f80d76aea67db71a6.zip
Merge pull request #5059 from kasimi/ticket/15476
[ticket/15476] Add event core.search_modify_post_row
-rw-r--r--phpBB/search.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 0d9b2bbfe8..eabb1fc96e 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -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']);