aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/rss/file/enclosure.php
blob: 600d287efb5d5055c26909b9e888ca4a2e211491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
/**
 * Link to download the file
 *
 * @uses $vars['entity']
 */

if (elgg_instanceof($vars['entity'], 'object', 'file')) {
	$download_url = elgg_get_site_url() . 'mod/file/download.php?file_guid=' . $vars['entity']->getGUID();
	$size = $vars['entity']->size();
	$mime_type = $vars['entity']->getMimeType();
	echo <<<END

	<enclosure url="$download_url" length="$size" type="$mime_type" />";
END;
}