diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 22:39:46 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 22:39:46 +0000 |
commit | cc6b7d1d223241e397e0d41354924e74606eeffc (patch) | |
tree | 0ab9761a9b4db387edd3f3b17568bbee1c2b78c6 /engine/lib/views.php | |
parent | ca9ed0b16163dcf77154c0adc702e9f4c63df13c (diff) | |
download | elgg-cc6b7d1d223241e397e0d41354924e74606eeffc.tar.gz elgg-cc6b7d1d223241e397e0d41354924e74606eeffc.tar.bz2 |
Refs #650. Replaced calls to get_annotations() by elgg_get_annotations().
git-svn-id: http://code.elgg.org/elgg/trunk@8182 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php index 21d606e01..d1782acc2 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1088,13 +1088,21 @@ 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', '', 0, $number, 0, 'desc', 0, 0, $owner_guid); + $options = array( + 'annotation_name' => 'generic_comment', + 'owner_guid' => $owner_guid, + 'order_by' => 'n_table.time_created desc', + 'limit' => $number + + ); + $comments = elgg_get_annotations($options); + $body = elgg_view('layout/objects/list', array( 'items' => $comments, 'pagination' => false, 'list_class' => 'elgg-latest-comments', )); - + return elgg_view_module('aside', $title, $body); } |