]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #3085 improved documentation of elgg_view_entity_list() which already supported...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Mar 2011 14:37:16 +0000 (14:37 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 12 Mar 2011 14:37:16 +0000 (14:37 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8657 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php

index 25d5ea58a8e5845919e19b0172e01f4c2bdb9b18..199f79daec18bdd0f5f4d656c85d6059f8bb8acc 100644 (file)
@@ -920,10 +920,10 @@ function elgg_view_annotation(ElggAnnotation $annotation, $full = true, $bypass
  *             'gallery'          Display as gallery?
  *             'list_type_toggle' Display the list type toggle?
  *
- * @return string The list of entities
+ * @return string The rendered list of entities
  * @access private
  */
-function elgg_view_entity_list($entities, $count, $offset = 0, $limit = 10, $full_view = true,
+function elgg_view_entity_list($entities, $vars, $offset = 0, $limit = 10, $full_view = true,
 $list_type_toggle = true, $pagination = true) {
 
        if (!is_int($offset)) {
@@ -942,14 +942,15 @@ $list_type_toggle = true, $pagination = true) {
                        'offset' => $offset,
                );
 
-               $vars = array_merge($defaults, $count);
+               $vars = array_merge($defaults, $vars);
 
        } else {
-               // old function - because this is an internal function we can remove
-               // this in Elgg 1.9 without following the normal deprecation procedures
+               // old function parameters
+               elgg_deprecated_notice("Please update your use of elgg_view_entity_list()", 1.8);
+
                $vars = array(
                        'items' => $entities,
-                       'count' => (int) $count,
+                       'count' => (int) $vars, // the old count parameter
                        'offset' => $offset,
                        'limit' => (int) $limit,
                        'full_view' => $full_view,