From 08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 5 Apr 2010 16:51:32 +0000 Subject: Merged 5605:5622 from 1.7 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@5623 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/views/rss/search/comments/entity.php | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 mod/search/views/rss/search/comments/entity.php (limited to 'mod/search/views/rss') diff --git a/mod/search/views/rss/search/comments/entity.php b/mod/search/views/rss/search/comments/entity.php new file mode 100644 index 000000000..1b788fbae --- /dev/null +++ b/mod/search/views/rss/search/comments/entity.php @@ -0,0 +1,53 @@ +getVolatileData('search_matched_comment_owner_guid'); +$author = get_user($comment_author_guid); +if ($author) { + $author_name = $author->name; +} + +// @todo Sometimes we find comments on entities we can't display... +if ($entity->getVolatileData('search_unavailable_entity')) { + $title = sprintf(elgg_echo('search:comment_on'), elgg_echo('search:unavailable_entity')); +} else { + if ($entity->getType() == 'object') { + $title = $entity->title; + } else { + $title = $entity->name; + } + + if (!$title) { + $title = elgg_echo('item:' . $entity->getType() . ':' . $entity->getSubtype()); + } + + if (!$title) { + $title = elgg_echo('item:' . $entity->getType()); + } + + $title = sprintf(elgg_echo('search:comment_on'), $title); + $title .= ' ' . elgg_echo('search:comment_by') . ' ' . $author_name; + $url = $entity->getURL() . '#annotation-' . $entity->getVolatileData('search_match_annotation_id'); +} + +$description = $entity->getVolatileData('search_matched_comment'); +$tc = $entity->getVolatileData('search_matched_comment_time_created');; + +?> + + + + + + <![CDATA[<?php echo $title; ?>]]> + ]]> + -- cgit v1.2.3