blob: fb4a899d976cf7c1b1b183627b11c713d88107c0 (
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() . 'file/download/' . $vars['entity']->getGUID();
$size = $vars['entity']->size();
$mime_type = $vars['entity']->getMimeType();
echo <<<END
<enclosure url="$download_url" length="$size" type="$mime_type" />";
END;
}
|