]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4303 passing arguments to elgg_view_entity_list in options array
authorCash Costello <cash.costello@gmail.com>
Sat, 21 Jan 2012 01:59:34 +0000 (20:59 -0500)
committerCash Costello <cash.costello@gmail.com>
Sat, 21 Jan 2012 01:59:34 +0000 (20:59 -0500)
engine/lib/entities.php
engine/lib/users.php
mod/members/pages/members/search.php

index 82452fba16d6a691c4abd5e7f8d8d72fb9de35de..f3bf9fb299c71f54422ffac7ba74eb4bcf4521ad 100644 (file)
@@ -2162,8 +2162,8 @@ function elgg_list_registered_entities(array $options = array()) {
                $entities = array();
        }
 
-       return elgg_view_entity_list($entities, $count, $options['offset'],
-               $options['limit'], $options['full_view'], $options['list_type_toggle'], $options['pagination']);
+       $options['count'] = $count;
+       return elgg_view_entity_list($entities, $options);
 }
 
 /**
index c38bb676e61ff3a1051376d4df8c2505de58f15b..14cdd55d4d90773470d88bc947ecb050a10bcaaf 100644 (file)
@@ -497,20 +497,26 @@ $timelower = 0, $timeupper = 0) {
  * @param int    $timelower      The earliest time the entity can have been created. Default: all
  * @param int    $timeupper      The latest time the entity can have been created. Default: all
  *
- * @return string The list in a form suitable to display
+ * @return string
  */
 function list_user_friends_objects($user_guid, $subtype = "", $limit = 10, $full_view = true,
 $listtypetoggle = true, $pagination = true, $timelower = 0, $timeupper = 0) {
 
-       $offset = (int) get_input('offset');
-       $limit = (int) $limit;
-       $count = (int) count_user_friends_objects($user_guid, $subtype, $timelower, $timeupper);
+       $offset = (int)get_input('offset');
+       $limit = (int)$limit;
+       $count = (int)count_user_friends_objects($user_guid, $subtype, $timelower, $timeupper);
 
        $entities = get_user_friends_objects($user_guid, $subtype, $limit, $offset,
                $timelower, $timeupper);
 
-       return elgg_view_entity_list($entities, $count, $offset, $limit, $full_view,
-               $listtypetoggle, $pagination);
+       return elgg_view_entity_list($entities, array(
+               'count' => $count,
+               'offset' => $offset,
+               'limit' => $limit,
+               'full_view' => $full_view,
+               'list_type_toggle' => $listtypetoggle,
+               'pagination' => $pagination,
+       ));
 }
 
 /**
index 94127768a5bbaeb045a28461d023f71f17cd3d35..1f0444d671c5ca75e893da08e49245d0b76f77e4 100644 (file)
@@ -17,7 +17,14 @@ if ($vars['search_type'] == 'tag') {
        $results = elgg_trigger_plugin_hook('search', 'tags', $options, array());
        $count = $results['count'];
        $users = $results['entities'];
-       $content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true);
+       $content = elgg_view_entity_list($users, array(
+               'count' => $count,
+               'offset' => $offset,
+               'limit' => $limit,
+               'full_view' => false,
+               'list_type_toggle' => false,
+               'pagination' => true,
+       ));
 } else {
        $name = sanitize_string(get_input('name'));