aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.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_default.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 '')
-rw-r--r--include/category_default.inc.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 5c8023f73..c7069ae9e 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -85,9 +85,18 @@ while ($row = mysql_fetch_array($result))
$name = replace_search($name, $_GET['search']);
}
// thumbnail url
- $thumbnail_url = $cat_directory;
- $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail'];
- $thumbnail_url.= $file.'.'.$row['tn_ext'];
+ if (isset($row['tn_ext']) and $row['tn_ext'] != '')
+ {
+ $thumbnail_url = $cat_directory;
+ $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail'];
+ $thumbnail_url.= $file.'.'.$row['tn_ext'];
+ }
+ else
+ {
+ $thumbnail_url = './template/'.$user['template'].'/mimetypes/';
+ $thumbnail_url.= strtolower(get_extension($row['file'])).'.png';
+ }
+
// message in title for the thumbnail
$thumbnail_title = $row['file'];
if ($row['filesize'] == '')