aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_picture.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-02-13 01:19:29 +0000
committerrvelices <rv-github@modusoptimus.com>2008-02-13 01:19:29 +0000
commit42b184eed3c3e33fc2476c986a8eb06a766bb4b8 (patch)
treef2bcaf014e5e0a2ee970e67346a2a8137363f271 /include/functions_picture.inc.php
parent4cc7dfbffbdc120e144f70eff38afcf5d444eec8 (diff)
fix: non-image elements without representative and without mime type icon default to thumbnail if possible
git-svn-id: http://piwigo.org/svn/trunk@2206 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_picture.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/functions_picture.inc.php b/include/functions_picture.inc.php
index 4a21c1bcc..d11574b57 100644
--- a/include/functions_picture.inc.php
+++ b/include/functions_picture.inc.php
@@ -148,6 +148,11 @@ function get_image_location($element_info)
$ext = get_extension($element_info['path']);
$path = get_themeconf('mime_icon_dir');
$path.= strtolower($ext).'.png';
+ if ( !file_exists(PHPWG_ROOT_PATH.$path)
+ and !empty($element_info['tn_ext']) )
+ {
+ $path = get_thumbnail_location($element_info);
+ }
}
// plugins want another location ?