aboutsummaryrefslogtreecommitdiff
path: root/views/rss/object
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/object
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/object')
-rw-r--r--views/rss/object/creator.php8
-rw-r--r--views/rss/object/default.php23
-rw-r--r--views/rss/object/georss.php10
3 files changed, 11 insertions, 30 deletions
diff --git a/views/rss/object/creator.php b/views/rss/object/creator.php
deleted file mode 100644
index 2bc6fd57d..000000000
--- a/views/rss/object/creator.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- *
- */
-
-if ($owner = $vars['entity']->getOwnerEntity()) {
- echo "<dc:creator>{$owner->name}</dc:creator>";
-}
diff --git a/views/rss/object/default.php b/views/rss/object/default.php
index 29e5d4591..be8025953 100644
--- a/views/rss/object/default.php
+++ b/views/rss/object/default.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg default object view
+ * RSS object view
*
* @package Elgg
* @subpackage Core
@@ -8,19 +8,18 @@
$title = $vars['entity']->title;
if (empty($title)) {
- $subtitle = strip_tags($vars['entity']->description);
- $title = substr($subtitle, 0, 32);
- if (strlen($subtitle) > 32) {
- $title .= ' ...';
- }
+ $title = strip_tags($vars['entity']->description);
+ $title = elgg_get_excerpt($title, 32);
}
-$permalink = htmlspecialchars($vars['entity']->getURL());
-$pubdate = date('r', $vars['entity']->time_created);
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
-$creator = elgg_view('object/creator', $vars);
-$georss = elgg_view('object/georss', $vars);
-$extension = elgg_view('extensions/item');
+$description = autop($vars['entity']->description);
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item', $vars);
$item = <<<__HTML
<item>
@@ -28,7 +27,7 @@ $item = <<<__HTML
<pubDate>$pubdate</pubDate>
<link>$permalink</link>
<title><![CDATA[$title]]></title>
- <description><![CDATA[{$vars['entity']->description}]]></description>
+ <description><![CDATA[$description]]></description>
$creator$georss$extension
</item>
diff --git a/views/rss/object/georss.php b/views/rss/object/georss.php
deleted file mode 100644
index 8aa027519..000000000
--- a/views/rss/object/georss.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-/**
- *
- */
-
-if (($vars['entity'] instanceof Locatable) &&
- ($latitude = $vars['entity']->getLongitude()) && ($longitude = $vars['entity']->getLatitude())
-) {
- echo "<georss:point>$latitude $longitude</georss:point>";
-} \ No newline at end of file