diff options
author | rxu <rxu@mail.ru> | 2014-05-11 14:02:22 +0800 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2014-05-11 16:10:54 +0800 |
commit | 1b24d6897187dfa50c4847ccfe1241b2df03571d (patch) | |
tree | 9e8165468aaa01e168df7128339e1b6c7091eeca | |
parent | d340d2fe253e2628a52a669353bf5e74c5c859a1 (diff) | |
download | forums-1b24d6897187dfa50c4847ccfe1241b2df03571d.tar forums-1b24d6897187dfa50c4847ccfe1241b2df03571d.tar.gz forums-1b24d6897187dfa50c4847ccfe1241b2df03571d.tar.bz2 forums-1b24d6897187dfa50c4847ccfe1241b2df03571d.tar.xz forums-1b24d6897187dfa50c4847ccfe1241b2df03571d.zip |
[ticket/12524] Add search.php core event to modify search results rowset
Currently it is possible to change search results within the search row scope,
but it should be possible to modify/unset every individual row
within the rowset.
PHPBB3-12524
-rw-r--r-- | phpBB/search.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index a34c0a4e5a..9fe1d92915 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -911,6 +911,30 @@ if ($keywords || $author || $author_id || $search_id || $submit) $hilit = implode('|', $hilit_array); } + /** + * Modify the rowset data + * + * @event core.search_modify_rowset + * @var array attachments Array with posts attachments data + * @var string hilit String to highlight + * @var array rowset Array with the search results data + * @var array topic_tracking_info Array with the topics tracking 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.1.0-b4 + */ + $vars = array( + 'attachments', + 'hilit', + 'rowset', + 'topic_tracking_info', + 'u_hilit', + 'view', + 'zebra', + ); + extract($phpbb_dispatcher->trigger_event('core.search_modify_rowset', compact($vars))); + foreach ($rowset as $row) { $forum_id = $row['forum_id']; |