aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_subcats.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-08-05 17:38:14 +0000
committerz0rglub <z0rglub@piwigo.org>2004-08-05 17:38:14 +0000
commitcedd2515b6b21404a419c1381a58b634b38aa304 (patch)
tree2da686a93e81d8e6f3a30b255bb7407d87e4c21e /include/category_subcats.inc.php
parent011d68c4d63f5cab39862f05ff1ae9b799e11df3 (diff)
non picture files management
git-svn-id: http://piwigo.org/svn/trunk@470 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_subcats.inc.php')
-rw-r--r--include/category_subcats.inc.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/category_subcats.inc.php b/include/category_subcats.inc.php
index cf63d7e1f..a7791a5a2 100644
--- a/include/category_subcats.inc.php
+++ b/include/category_subcats.inc.php
@@ -89,9 +89,17 @@ SELECT file,tn_ext,storage_category_id
$file = get_filename_wo_extension($image_row['file']);
// creating links for thumbnail and associated category
- $thumbnail_link = get_complete_dir($image_row['storage_category_id']);
- $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
- $thumbnail_link.= $file.'.'.$image_row['tn_ext'];
+ if (isset($image_row['tn_ext']) and $image_row['tn_ext'] != '')
+ {
+ $thumbnail_link = get_complete_dir($image_row['storage_category_id']);
+ $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
+ $thumbnail_link.= $file.'.'.$image_row['tn_ext'];
+ }
+ else
+ {
+ $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
+ $thumbnail_link.= strtolower(get_extension($image_row['file'])).'.png';
+ }
$thumbnail_title = $lang['hint_category'];