aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views')
-rw-r--r--mod/file/views/default/file/upload.php66
-rw-r--r--mod/file/views/default/widgets/filerepo/content.php1
-rw-r--r--mod/file/views/rss/object/file.php41
3 files changed, 51 insertions, 57 deletions
diff --git a/mod/file/views/default/file/upload.php b/mod/file/views/default/file/upload.php
index 0ef99348c..041bd9227 100644
--- a/mod/file/views/default/file/upload.php
+++ b/mod/file/views/default/file/upload.php
@@ -1,40 +1,40 @@
<?php
- /**
- * Elgg file browser uploader
- *
- * @package ElggFile
- */
+/**
+ * Elgg file browser uploader
+ *
+ * @package ElggFile
+ */
- global $CONFIG;
+global $CONFIG;
- if (isset($vars['entity'])) {
- $action_type = "update";
- $action = "file/upload";
- $title = $vars['entity']->title;
- $description = $vars['entity']->description;
- $tags = $vars['entity']->tags;
- $access_id = $vars['entity']->access_id;
- $container_guid = $vars['entity']->container_guid;
- } else {
- $action_type = "new";
- $action = "file/upload";
- $title = isset($_SESSION['uploadtitle']) ? $_SESSION['uploadtitle'] : '';
- $description = isset($_SESSION['uploaddesc']) ? $_SESSION['uploaddesc'] : '';
- $tags = isset($_SESSION['uploadtags']) ? $_SESSION['uploadtags'] : '';
- if (defined('ACCESS_DEFAULT')) {
- $access_id = ACCESS_DEFAULT;
- } else {
- $access_id = 0;
- }
- $access_id = isset($_SESSION['uploadaccessid']) ? $_SESSION['uploadaccessid'] : $access_id;
- $container_guid = elgg_get_page_owner_guid();
+if (isset($vars['entity'])) {
+ $action_type = "update";
+ $action = "file/upload";
+ $title = $vars['entity']->title;
+ $description = $vars['entity']->description;
+ $tags = $vars['entity']->tags;
+ $access_id = $vars['entity']->access_id;
+ $container_guid = $vars['entity']->container_guid;
+} else {
+ $action_type = "new";
+ $action = "file/upload";
+ $title = isset($_SESSION['uploadtitle']) ? $_SESSION['uploadtitle'] : '';
+ $description = isset($_SESSION['uploaddesc']) ? $_SESSION['uploaddesc'] : '';
+ $tags = isset($_SESSION['uploadtags']) ? $_SESSION['uploadtags'] : '';
+ if (defined('ACCESS_DEFAULT')) {
+ $access_id = ACCESS_DEFAULT;
+ } else {
+ $access_id = 0;
}
-
- // make sure session cache is cleared
- unset($_SESSION['uploadtitle']);
- unset($_SESSION['uploaddesc']);
- unset($_SESSION['uploadtags']);
- unset($_SESSION['uploadaccessid']);
+ $access_id = isset($_SESSION['uploadaccessid']) ? $_SESSION['uploadaccessid'] : $access_id;
+ $container_guid = elgg_get_page_owner_guid();
+}
+
+// make sure session cache is cleared
+unset($_SESSION['uploadtitle']);
+unset($_SESSION['uploaddesc']);
+unset($_SESSION['uploadtags']);
+unset($_SESSION['uploadaccessid']);
?>
diff --git a/mod/file/views/default/widgets/filerepo/content.php b/mod/file/views/default/widgets/filerepo/content.php
index ee7bbe3cc..130b5e3de 100644
--- a/mod/file/views/default/widgets/filerepo/content.php
+++ b/mod/file/views/default/widgets/filerepo/content.php
@@ -68,4 +68,3 @@ if ($files) {
echo "<p class='margin-top'>" . elgg_echo("file:none") . "</p>";
}
-?> \ No newline at end of file
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>