diff options
Diffstat (limited to '')
-rw-r--r-- | picture.php | 7 | ||||
-rw-r--r-- | themes/default/template/picture.tpl | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/picture.php b/picture.php index f2dfecf0e..093e4b271 100644 --- a/picture.php +++ b/picture.php @@ -679,6 +679,13 @@ SELECT * $format['download_url'] = 'action.php?format='.$format['format_id']; $format['download_url'].= '&download='.substr(md5(time()), 0, 6); // a random string to avoid browser cache + $format['label'] = strtoupper($format['ext']); + $lang_key = 'format '.strtoupper($format['ext']); + if (isset($lang[$lang_key])) + { + $format['label'] = $lang[$lang_key]; + } + $format['filesize'] = sprintf('%.1fMB', $format['filesize']/1024); } } diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index c576748fb..f18fdd615 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -95,7 +95,7 @@ jQuery().ready(function() { <ul> <li><a href="{$current.U_DOWNLOAD}" rel="nofollow">{'Original'|@translate}</a></li> {foreach from=$current.formats item=format} - <li><a href="{$format.download_url}" rel="nofollow">{$format.ext|upper}<span class="downloadformatDetails"> ({$format.filesize})</span></a></li> + <li><a href="{$format.download_url}" rel="nofollow">{$format.label}<span class="downloadformatDetails"> ({$format.filesize})</span></a></li> {/foreach} </ul> </div> |