aboutsummaryrefslogtreecommitdiff
path: root/mod/search/index.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-20 00:07:22 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-20 00:07:22 +0000
commit79455e6a6f76844742b4cafdca151e7b0bba00fd (patch)
tree2a8c336db63a742d7e619d1dc3863764331bf658 /mod/search/index.php
parent43d1cc1bbe4b9c41ac8f6305aa9fe7fb48626565 (diff)
downloadelgg-79455e6a6f76844742b4cafdca151e7b0bba00fd.tar.gz
elgg-79455e6a6f76844742b4cafdca151e7b0bba00fd.tar.bz2
Fixes #1523: Updated search to use ELGG_ENTITIES_NO_VALUE/ANY_VALUE and removed some commented out code.
git-svn-id: http://code.elgg.org/elgg/trunk@3956 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/search/index.php')
-rw-r--r--mod/search/index.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/mod/search/index.php b/mod/search/index.php
index 2f10d5a21..88c91486b 100644
--- a/mod/search/index.php
+++ b/mod/search/index.php
@@ -19,10 +19,10 @@ $query = stripslashes(get_input('q', get_input('tag', '', FALSE), FALSE));
$limit = ($search_type == 'all') ? 2 : get_input('limit', 10);
$offset = ($search_type == 'all') ? 0 : get_input('offset', 0);
-$entity_type = get_input('entity_type', NULL);
-$entity_subtype = get_input('entity_subtype', NULL);
-$owner_guid = get_input('owner_guid', NULL);
-$friends = get_input('friends', 0);
+$entity_type = get_input('entity_type', ELGG_ENTITIES_ANY_VALUE);
+$entity_subtype = get_input('entity_subtype', ELGG_ENTITIES_ANY_VALUE);
+$owner_guid = get_input('owner_guid', ELGG_ENTITIES_ANY_VALUE);
+$friends = get_input('friends', ELGG_ENTITIES_ANY_VALUE);
$sort = get_input('sort');
switch ($sort) {
case 'relevance':
@@ -189,9 +189,8 @@ if ($search_type == 'all' || $search_type == 'entities') {
}
// pull in default type entities with no subtypes
- // @todo this might currently means "all entities regardless of subtype"
$current_params['type'] = $type;
- $current_params['subtype'] = 0;
+ $current_params['subtype'] = ELGG_ENTITIES_NO_VALUE;
$results = trigger_plugin_hook('search', $type, $current_params, array());
if ($results === FALSE) {