aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:21:44 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:21:44 +0000
commit210b27ec56ce6f5fffc14c89270865932638c779 (patch)
treecbf27ca702a0661506747a064d30570dace3cea1 /engine/classes
parent99175d2417bc5d3657cc3e548affe21eda76f648 (diff)
downloadelgg-210b27ec56ce6f5fffc14c89270865932638c779.tar.gz
elgg-210b27ec56ce6f5fffc14c89270865932638c779.tar.bz2
Fixes #3045 custom index and the friends widget now use the gallery view for user icons
git-svn-id: http://code.elgg.org/elgg/trunk@8677 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggUser.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php
index cceaacf58..5c65a4d66 100644
--- a/engine/classes/ElggUser.php
+++ b/engine/classes/ElggUser.php
@@ -360,20 +360,23 @@ class ElggUser extends ElggEntity
*
* @param string $subtype Optionally, the user subtype (leave blank for all)
* @param int $limit The number of users to retrieve
- * @param int $offset Indexing offset, if any
+ * @param array $vars Display variables for the user view
*
- * @return string
+ * @return string Rendered list of friends
+ * @since 1.8.0
*/
- function listFriends($subtype = "", $limit = 10, $offset = 0) {
- $options = array(
+ function listFriends($subtype = "", $limit = 10, array $vars = array()) {
+ $defaults = array(
'type' => 'user',
'relationship' => 'friend',
'relationship_guid' => $this->guid,
'limit' => $limit,
- 'offset' => $offset,
+ 'offset' => get_input('offset', 0),
'full_view' => false,
);
+ $options = array_merge($defaults, $vars);
+
if ($subtype) {
$options['subtype'] = $subtype;
}