diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-10-23 17:56:46 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-10-23 17:56:46 +0000 |
commit | 98b65edb831e95695cc840692ab8ad294478f80d (patch) | |
tree | 2b1ffe5ba3c8bc1fcdb209e8f8d793bd18e9dd1d /include/category_subcats.inc.php | |
parent | 60ac6f180e9500c6fea0c872277f107f05d7d26d (diff) |
- refactoring of comments.php
- creation of function get_thumbnail_src used everywhere a thumbnail must be
displayed
- creation of function parse_comment_content (used in comments.php and
picture.php)
- concerning undefined index on arrays retrieved in database, instead of
testing possibly unset values, use of @ operator (smarter...)
- add pre tag in default.css stylesheet for debugging purpose (need to have
left aligned text)
git-svn-id: http://piwigo.org/svn/trunk@579 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_subcats.inc.php')
-rw-r--r-- | include/category_subcats.inc.php | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/category_subcats.inc.php b/include/category_subcats.inc.php index a7791a5a2..6758f9e9a 100644 --- a/include/category_subcats.inc.php +++ b/include/category_subcats.inc.php @@ -86,20 +86,9 @@ SELECT file,tn_ext,storage_category_id $image_result = mysql_query($query); $image_row = mysql_fetch_array($image_result); - $file = get_filename_wo_extension($image_row['file']); - - // creating links for thumbnail and associated category - 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_link = get_thumbnail_src($image_row['file'], + $image_row['storage_category_id'], + @$image_row['tn_ext']); $thumbnail_title = $lang['hint_category']; |