]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed the function for viewing latest comments
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 1 Jan 2011 17:53:14 +0000 (17:53 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 1 Jan 2011 17:53:14 +0000 (17:53 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7802 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php

index 878db04d8229501c67170578b022ffd22831ca2f..951210f5a027d214b820988c8d395e2b524ac88c 100644 (file)
@@ -1054,13 +1054,13 @@ function elgg_view_comments($entity, $add_comment = true) {
  */
 function elgg_view_latest_comments($owner_guid, $type = 'object', $subtype = '', $number = 4) {
        $title = elgg_echo('generic_comments:latest');
-       $comments = get_annotations(0, $type, $subtype, "generic_comment", "", $owner_guid, 4, 0, "desc");
+       $comments = get_annotations(0, $type, $subtype, 'generic_comment', '', 0, $number, 0, 'desc', 0, 0, $owner_guid);
        $body = elgg_view('layout/objects/list', array(
                'items' => $comments,
                'pagination' => false,
                'list_class' => 'elgg-latest-comments',
        ));
-       echo elgg_view('layout/objects/module', array('title' => $title, 'body' => $body));
+       return elgg_view('layout/objects/module', array('title' => $title, 'body' => $body));
 }
 /**
  * Wrapper function for the image block display pattern.