aboutsummaryrefslogtreecommitdiff
path: root/mod/search
diff options
context:
space:
mode:
Diffstat (limited to 'mod/search')
-rw-r--r--mod/search/index.php10
-rw-r--r--mod/search/start.php16
2 files changed, 13 insertions, 13 deletions
diff --git a/mod/search/index.php b/mod/search/index.php
index 54054244a..035401640 100644
--- a/mod/search/index.php
+++ b/mod/search/index.php
@@ -64,7 +64,7 @@ $params = array(
);
$types = get_registered_entity_types();
-$custom_types = trigger_plugin_hook('search_types', 'get_types', $params, array());
+$custom_types = elgg_trigger_plugin_hook('search_types', 'get_types', $params, array());
// add submenu items for all and native types
// @todo should these maintain any existing type / subtype filters or reset?
@@ -172,7 +172,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
$current_params['subtype'] = $subtype;
$current_params['type'] = $type;
- $results = trigger_plugin_hook('search', "$type:$subtype", $current_params, NULL);
+ $results = elgg_trigger_plugin_hook('search', "$type:$subtype", $current_params, NULL);
if ($results === FALSE) {
// someone is saying not to display these types in searches.
continue;
@@ -182,7 +182,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
// no results and not hooked. use default type search.
// don't change the params here, since it's really a different subtype.
// Will be passed to elgg_get_entities().
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
}
if (is_array($results['entities']) && $results['count']) {
@@ -197,7 +197,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
$current_params['type'] = $type;
$current_params['subtype'] = ELGG_ENTITIES_NO_VALUE;
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
if ($results === FALSE) {
// someone is saying not to display these types in searches.
continue;
@@ -224,7 +224,7 @@ if ($search_type != 'entities' || $search_type == 'all') {
// custom search types have no subtype.
unset($current_params['subtype']);
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
if ($results === FALSE) {
// someone is saying not to display these types in searches.
diff --git a/mod/search/start.php b/mod/search/start.php
index 791555a99..9369e9221 100644
--- a/mod/search/start.php
+++ b/mod/search/start.php
@@ -18,19 +18,19 @@ function search_init() {
register_page_handler('search','search_page_handler');
// register some default search hooks
- register_plugin_hook('search', 'object', 'search_objects_hook');
- register_plugin_hook('search', 'user', 'search_users_hook');
+ elgg_register_plugin_hook_handler('search', 'object', 'search_objects_hook');
+ elgg_register_plugin_hook_handler('search', 'user', 'search_users_hook');
// @todo pull this out into groups
- register_plugin_hook('search', 'group', 'search_groups_hook');
+ elgg_register_plugin_hook_handler('search', 'group', 'search_groups_hook');
// tags and comments are a bit different.
// register a search types and a hooks for them.
- register_plugin_hook('search_types', 'get_types', 'search_custom_types_tags_hook');
- register_plugin_hook('search', 'tags', 'search_tags_hook');
+ elgg_register_plugin_hook_handler('search_types', 'get_types', 'search_custom_types_tags_hook');
+ elgg_register_plugin_hook_handler('search', 'tags', 'search_tags_hook');
- register_plugin_hook('search_types', 'get_types', 'search_custom_types_comments_hook');
- register_plugin_hook('search', 'comments', 'search_comments_hook');
+ elgg_register_plugin_hook_handler('search_types', 'get_types', 'search_custom_types_comments_hook');
+ elgg_register_plugin_hook_handler('search', 'comments', 'search_comments_hook');
// get server min and max allowed chars for ft searching
$CONFIG->search_info = array();
@@ -491,4 +491,4 @@ function search_get_order_by_sql($entities_table, $type_table, $sort, $order) {
}
/** Register init system event **/
-register_elgg_event_handler('init','system','search_init');
+elgg_register_event_handler('init','system','search_init');