aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--picture.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/picture.php b/picture.php
index 8698a0167..7e1af41d2 100644
--- a/picture.php
+++ b/picture.php
@@ -142,12 +142,7 @@ foreach (array('prev', 'current', 'next') as $i)
$picture[$i]['is_picture'] = true;
}
- if ( !isset($array_cat_directories[$row['storage_category_id']]))
- {
- $array_cat_directories[$row['storage_category_id']] =
- get_complete_dir( $row['storage_category_id'] );
- }
- $cat_directory = $array_cat_directories[$row['storage_category_id']];
+ $cat_directory = dirname($row['path']);
$file_wo_ext = get_filename_wo_extension($row['file']);
$icon = './template/'.$user['template'].'/mimetypes/';
@@ -165,7 +160,7 @@ foreach (array('prev', 'current', 'next') as $i)
// special case for picture files
if ($picture[$i]['is_picture'])
{
- $picture[$i]['src'] = $cat_directory.$row['file'];
+ $picture[$i]['src'] = $row['path'];
// if we are working on the "current" element, we search if there is a
// high quality picture
// FIXME : with remote pictures, this "remote fopen" takes long...
@@ -181,12 +176,10 @@ foreach (array('prev', 'current', 'next') as $i)
// if picture is not a file, we need the download link
if (!$picture[$i]['is_picture'])
{
- $picture[$i]['download'] = $cat_directory.$row['file'];
+ $picture[$i]['download'] = $row['path'];
}
- $picture[$i]['thumbnail'] = get_thumbnail_src($row['file'],
- $row['storage_category_id'],
- @$row['tn_ext']);
+ $picture[$i]['thumbnail'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
if ( !empty( $row['name'] ) )
{