aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default')
-rw-r--r--mod/file/views/default/file/specialcontent/image/default.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/mod/file/views/default/file/specialcontent/image/default.php b/mod/file/views/default/file/specialcontent/image/default.php
index fbd994a0b..431ac9f4f 100644
--- a/mod/file/views/default/file/specialcontent/image/default.php
+++ b/mod/file/views/default/file/specialcontent/image/default.php
@@ -1,13 +1,17 @@
<?php
/**
* Display an image
+ *
+ * @uses $vars['entity']
*/
-$image_url = elgg_get_site_url() . "mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large";
+$file = $vars['entity'];
+
+$image_url = $file->getIconURL('large');
$image_url = elgg_format_url($image_url);
-$download_url = elgg_get_site_url() . "mod/file/download.php?file_guid={$vars['entity']->getGUID()}";
+$download_url = elgg_get_site_url() . "file/download/{$file->getGUID()}";
-if ($vars['full_view'] && $smallthumb = $vars['entity']->smallthumb) {
+if ($vars['full_view']) {
echo <<<HTML
<div class="file-photo">
<a href="$download_url"><img class="elgg-photo" src="$image_url" /></a>