aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/rss
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-31 14:47:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-31 14:47:38 +0000
commit24ef7261d523155ee1c58e8297516e726b4ce80b (patch)
treedfdb6b1ef7be64237e19b70d7954f149789a72f7 /mod/file/views/rss
parentb4bd662414f2d49f238bf0fabf05878d9d967877 (diff)
downloadelgg-24ef7261d523155ee1c58e8297516e726b4ce80b.tar.gz
elgg-24ef7261d523155ee1c58e8297516e726b4ce80b.tar.bz2
a little standardization of the file plugin code
git-svn-id: http://code.elgg.org/elgg/trunk@7789 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/views/rss')
-rw-r--r--mod/file/views/rss/object/file.php41
1 files changed, 18 insertions, 23 deletions
diff --git a/mod/file/views/rss/object/file.php b/mod/file/views/rss/object/file.php
index 52d26382f..a0660d6c8 100644
--- a/mod/file/views/rss/object/file.php
+++ b/mod/file/views/rss/object/file.php
@@ -1,26 +1,21 @@
<?php
-
- /**
- * Elgg RSS file object view
- *
- * @package ElggFile
- * @subpackage Core
- */
-
- $title = $vars['entity']->title;
- if (empty($title)) {
- $title = substr($vars['entity']->description,0,32);
- if (strlen($vars['entity']->description) > 32)
- $title .= " ...";
- }
-
+/**
+ * Elgg RSS file object view
+ *
+ * @package ElggFile
+ * @subpackage Core
+ */
+$title = $vars['entity']->title;
+if (empty($title)) {
+ $title = elgg_get_excerpt($vars['entity']->description, 32);
+}
?>
- <item>
- <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
- <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
- <link><?php echo $vars['entity']->getURL(); ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
- <enclosure url="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" />
- </item>
+<item>
+ <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
+ <pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
+ <link><?php echo $vars['entity']->getURL(); ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
+ <enclosure url="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" />
+</item>