diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-10 22:22:40 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-10 22:22:40 +0000 |
commit | c8f6c3c934df01bf969e3d91ae67f0887de10da9 (patch) | |
tree | d21179fda1e19d540eb3ea56b31584f86fc1e338 /mod/search | |
parent | a7801c71ecc6ce0f0d2a8fc82cdc779da9417aa4 (diff) | |
download | elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.gz elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.bz2 |
Fixes #2367: With fear and trepidation, converting events/plugin hooks to use elgg_ prefixed versions
git-svn-id: http://code.elgg.org/elgg/trunk@7284 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/search')
-rw-r--r-- | mod/search/index.php | 10 | ||||
-rw-r--r-- | mod/search/start.php | 16 |
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'); |