aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/annotations.php5
-rw-r--r--engine/lib/views.php12
2 files changed, 14 insertions, 3 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index a3f8f0bb9..a14853359 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -507,7 +507,10 @@ function export_annotation_plugin_hook($hook, $entity_type, $returnvalue, $param
$guid = (int)$params['guid'];
$name = $params['name'];
- $result = get_annotations($guid);
+ $result = elgg_get_annotations(array(
+ 'guid' => $guid,
+ 'limit' => 0
+ ));
if ($result) {
foreach ($result as $r) {
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);
}