From 6e3a38ff9128db14b5b7df66e942670068243047 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 26 Feb 2009 17:26:51 +0000 Subject: The search endpoint can now be told to go fetch a users' friends. git-svn-id: https://code.elgg.org/elgg/trunk@2967 36083f99-b078-4883-b0ff-0f9b5a30f544 --- search/index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'search') diff --git a/search/index.php b/search/index.php index 4fda4ceb8..a0deac413 100644 --- a/search/index.php +++ b/search/index.php @@ -33,6 +33,17 @@ } else { $owner_guid_array = $owner_guid; } + $friends = (int) get_input('friends',0); + if ($friends > 0) { + if ($friends = get_user_friends($friends,'',9999)) { + $owner_guid_array = array(); + foreach($friends as $friend) { + $owner_guid_array[] = $friend->guid; + } + } else { + $owner_guid = -1; + } + } // Set up submenus if ($object_types = get_registered_entity_types()) { -- cgit v1.2.3