diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2018-02-20 20:00:23 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2018-02-20 20:00:23 +0100 |
| commit | eecff95ce17498e07bd3ebd3f216a97cf38f866e (patch) | |
| tree | 6164c1916b88de4ae58e8cdc683311799b8be36e /phpBB/phpbb/search/fulltext_native.php | |
| parent | 00777eec62849bf5e3430e6cadb2653832217abf (diff) | |
| parent | 9f7f3d14634c2995714800e93cf99272d3d531f0 (diff) | |
| download | forums-eecff95ce17498e07bd3ebd3f216a97cf38f866e.tar forums-eecff95ce17498e07bd3ebd3f216a97cf38f866e.tar.gz forums-eecff95ce17498e07bd3ebd3f216a97cf38f866e.tar.bz2 forums-eecff95ce17498e07bd3ebd3f216a97cf38f866e.tar.xz forums-eecff95ce17498e07bd3ebd3f216a97cf38f866e.zip | |
Merge pull request #5116 from kasimi/ticket/15537
[ticket/15537] Add core.search_(native|mysql|postgres|sphinx)_index_before
Diffstat (limited to 'phpBB/phpbb/search/fulltext_native.php')
| -rw-r--r-- | phpBB/phpbb/search/fulltext_native.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index bd222488a0..eb972a257a 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -1433,6 +1433,38 @@ class fulltext_native extends \phpbb\search\base $words['del']['post'] = array(); $words['del']['title'] = array(); } + + /** + * Event to modify method arguments and words before the native search index is updated + * + * @event core.search_native_index_before + * @var string mode Contains the post mode: edit, post, reply, quote + * @var int post_id The id of the post which is modified/created + * @var string message New or updated post content + * @var string subject New or updated post subject + * @var int poster_id Post author's user id + * @var int forum_id The id of the forum in which the post is located + * @var array words Grouped lists of words added to or remove from the index + * @var array split_text Array of words from the message + * @var array split_title Array of words from the title + * @var array cur_words Array of words currently in the index for comparing to new words + * when mode is edit. Empty for other modes. + * @since 3.2.3-RC1 + */ + $vars = array( + 'mode', + 'post_id', + 'message', + 'subject', + 'poster_id', + 'forum_id', + 'words', + 'split_text', + 'split_title', + 'cur_words', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_native_index_before', compact($vars))); + unset($split_text); unset($split_title); |
