aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-12 02:52:25 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-12 02:52:25 +0000
commit70dafccc9b4cdef58a559fc8fa5ec640bf13af1d (patch)
tree014bc2eb14bf8887b95cccf7b6d89b43761b9ec1 /mod
parenteda84204fbe210f4d88296954a33fa5e310194d2 (diff)
downloadelgg-70dafccc9b4cdef58a559fc8fa5ec640bf13af1d.tar.gz
elgg-70dafccc9b4cdef58a559fc8fa5ec640bf13af1d.tar.bz2
Cleaned up RSS entity view for search a bit.
git-svn-id: http://code.elgg.org/elgg/trunk@3801 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/search/views/rss/search/entity.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/mod/search/views/rss/search/entity.php b/mod/search/views/rss/search/entity.php
index 8c3609fe5..a8f9ebcc4 100644
--- a/mod/search/views/rss/search/entity.php
+++ b/mod/search/views/rss/search/entity.php
@@ -9,24 +9,20 @@
* @link http://elgg.org/
*/
-$title = $vars['entity']->title;
-if (empty($title)) {
- $title = substr($vars['entity']->description, 0, 32);
- if (strlen($vars['entity']->description) > 32) {
- $title .= " ...";
- }
+if (!array_key_exists('entity', $vars) || !($vars['entity'] instanceof ElggEntity)) {
+ return FALSE;
}
+// title cannot contain HTML but descriptions can.
+$title = strip_tags($vars['entity']->getVolatileData('search_matched_title'));
+$description = $vars['entity']->getVolatileData('search_matched_description');
+
?>
<item>
-<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
-<pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
-<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
-<title><![CDATA[<?php echo $title; ?>]]></title>
-<description><![CDATA[<?php
- $summary = $vars['entity']->summary;
- if (!empty($summary)) echo wpautop($summary);
- echo (autop($vars['entity']->description));
-?>]]></description>
+ <guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
+ <pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
+ <link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo $description; ?>]]></description>
</item>