aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorErwan Nader <ernadoo@gmail.com>2016-07-24 17:46:23 +0200
committerErwan Nader <ernadoo@gmail.com>2016-07-24 17:46:23 +0200
commit4eecc95a42d8493b80a4b1a7684c84b3ffe488c3 (patch)
tree310b9381b5276da4a5295c6d01fbd01956cded2f /phpBB/search.php
parentef91c6abed8ac69e1bbf62b8e1cb0f4452d585ae (diff)
downloadforums-4eecc95a42d8493b80a4b1a7684c84b3ffe488c3.tar
forums-4eecc95a42d8493b80a4b1a7684c84b3ffe488c3.tar.gz
forums-4eecc95a42d8493b80a4b1a7684c84b3ffe488c3.tar.bz2
forums-4eecc95a42d8493b80a4b1a7684c84b3ffe488c3.tar.xz
forums-4eecc95a42d8493b80a4b1a7684c84b3ffe488c3.zip
[ticket/14592] [PHP] core.search_backend_search_after
PHPBB3-14592
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index a0380590c1..bffbd47996 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -575,6 +575,48 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_posts_fid_sql, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
}
+ /**
+ * Event to search otherwise than by keywords or author
+ *
+ * @event core.search_backend_search_after
+ * @var string $show_results 'posts' or 'topics' type of ids
+ * @var string $search_fields The data fields to search in
+ * @var string $search_terms Is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @var array $sort_by_sql Array of SQL sorting instructions
+ * @var string $sort_key The sort key
+ * @var string $sort_dir The sort direction
+ * @var string $sort_days Limit the age of results
+ * @var array $ex_fid_ary Array of excluded forum ids
+ * @var string $m_approve_posts_fid_sql Specifies which types of posts the user can view in which forums
+ * @var int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @var array $author_id_ary Array of exclusive author ids
+ * @var string $sql_author_match Specifies the author match, when ANONYMOUS is also a search-match
+ * @var array $id_ary Array of post or topic ids for search result
+ * @var int $start The starting id of the results
+ * @var int $per_page Number of ids each page is supposed to contain
+ * @var int $total_match_count The total number of search matches
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'show_results',
+ 'search_fields',
+ 'search_terms',
+ 'sort_by_sql',
+ 'sort_key',
+ 'sort_dir',
+ 'sort_days',
+ 'ex_fid_ary',
+ 'm_approve_posts_fid_sql',
+ 'topic_id',
+ 'author_id_ary',
+ 'sql_author_match',
+ 'id_ary',
+ 'start',
+ 'per_page',
+ 'total_match_count'
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_backend_search_after', compact($vars)));
+
$sql_where = '';
if (sizeof($id_ary))