aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-12-27 14:01:05 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-12-27 14:01:05 +0100
commitd5f99e0478c31bfa387462cdfa25bfb5f9893ea8 (patch)
tree05fe4661c9a0112ea9034c178777f9df167761fe /phpBB/search.php
parent7b43d5c54e82459925a27efb620980508543e703 (diff)
parent0795b6bd6c07483c78d7f8bd1f5a92ad695d10e9 (diff)
downloadforums-d5f99e0478c31bfa387462cdfa25bfb5f9893ea8.tar
forums-d5f99e0478c31bfa387462cdfa25bfb5f9893ea8.tar.gz
forums-d5f99e0478c31bfa387462cdfa25bfb5f9893ea8.tar.bz2
forums-d5f99e0478c31bfa387462cdfa25bfb5f9893ea8.tar.xz
forums-d5f99e0478c31bfa387462cdfa25bfb5f9893ea8.zip
Merge pull request #3216 from kinerity/ticket/13409
[ticket/13409] Add event core.search_modify_param_before
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 2598e407cc..164d834ff2 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -311,6 +311,26 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// define some variables needed for retrieving post_id/topic_id information
$sort_by_sql = array('a' => 'u.username_clean', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title'));
+ /**
+ * Event to modify the SQL parameters before pre-made searches
+ *
+ * @event core.search_modify_param_before
+ * @var string keywords String of the specified keywords
+ * @var array sort_by_sql Array of SQL sorting instructions
+ * @var array ex_fid_ary Array of excluded forum ids
+ * @var array author_id_ary Array of exclusive author ids
+ * @var string search_id The id of the search request
+ * @since 3.1.3-RC1
+ */
+ $vars = array(
+ 'keywords',
+ 'sort_by_sql',
+ 'ex_fid_ary',
+ 'author_id_ary',
+ 'search_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_param_before', compact($vars)));
+
// pre-made searches
$sql = $field = $l_search_title = '';
if ($search_id)