aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-09-22 21:26:31 +0200
committerMarc Alexander <admin@m-a-styles.de>2016-09-22 21:26:31 +0200
commit2436af94e3cc0249e4299a3773261f13822ee5df (patch)
tree1778e4bf5f3a489f6a8540053a6fda2ba96ed63d
parent75f57fa407cf09031281e769a33f4063375a7ddd (diff)
parent6b435cbf13487a8871caa7edb82644df98ce16a0 (diff)
downloadforums-2436af94e3cc0249e4299a3773261f13822ee5df.tar
forums-2436af94e3cc0249e4299a3773261f13822ee5df.tar.gz
forums-2436af94e3cc0249e4299a3773261f13822ee5df.tar.bz2
forums-2436af94e3cc0249e4299a3773261f13822ee5df.tar.xz
forums-2436af94e3cc0249e4299a3773261f13822ee5df.zip
Merge pull request #4392 from ErnadoO/PHPBB3-14592
[ticket/14592] [PHP] core.search_backend_search_after
-rw-r--r--phpBB/search.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index d12cee69fe..03575f7e0b 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -595,6 +595,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 int 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))