aboutsummaryrefslogtreecommitdiff
path: root/views/rss/annotation
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /views/rss/annotation
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'views/rss/annotation')
-rw-r--r--views/rss/annotation/default.php34
-rw-r--r--views/rss/annotation/generic_comment.php33
2 files changed, 33 insertions, 34 deletions
diff --git a/views/rss/annotation/default.php b/views/rss/annotation/default.php
deleted file mode 100644
index 98329f132..000000000
--- a/views/rss/annotation/default.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * Elgg RSS view for a generic comment
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$entity = get_entity($vars['annotation']->entity_guid);
-
-$title = substr($vars['annotation']->value, 0, 32);
-if (strlen($vars['annotation']->value) > 32) {
- $title .= " ...";
-}
-
-$permalink = $entity->getURL();
-$pubdate = date('r', $entity->time_created);
-
-$creator = elgg_view('object/creator', array('entity' => $entity));
-$georss = elgg_view('object/georss', array('entity' => $entity));
-$extensions = elgg_view('extensions/item');
-
-$item = <<<__HTML
-<item>
- <guid isPermaLink='true'>$permalink#{$vars['annotation']->id}</guid>
- <pubDate>$pubdate</pubDate>
- <link>$permalink#{$vars['annotation']->id}</link>
- <title><![CDATA[$title]]></title>
- <description><![CDATA[{$vars['annotation']->value}]]></description>
- $creator$georss$extensions
-</item>
-__HTML;
-
-echo $item;
diff --git a/views/rss/annotation/generic_comment.php b/views/rss/annotation/generic_comment.php
new file mode 100644
index 000000000..de652fc8e
--- /dev/null
+++ b/views/rss/annotation/generic_comment.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Elgg RSS view for a generic_comment annotation
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$annotation = $vars['annotation'];
+
+$poster = $annotation->getOwnerEntity();
+$poster_name = htmlspecialchars($poster->name, ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $annotation->getTimeCreated());
+$permalink = $annotation->getURL();
+
+$title = elgg_echo('generic_comment:title', array($poster_name));
+
+$creator = elgg_view('page/components/creator', array('entity' => $annotation));
+$extensions = elgg_view('extensions/item', $vars);
+
+$item = <<<__HTML
+<item>
+ <guid isPermaLink='true'>$permalink</guid>
+ <pubDate>$pubdate</pubDate>
+ <link>$permalink</link>
+ <title><![CDATA[$title]]></title>
+ <description><![CDATA[{$vars['annotation']->value}]]></description>
+ $creator$extensions
+</item>
+
+__HTML;
+
+echo $item;