aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-08-16 21:42:54 +0000
committerz0rglub <z0rglub@piwigo.org>2004-08-16 21:42:54 +0000
commitd1389ee8eb482e8517bfe01d02734cf2971fe3e4 (patch)
treec4f4023f8c56404efb8be691fe1ee2ec87231019 /picture.php
parentbe7e181cc8f8ef51e0727be2caef0a2973677cd7 (diff)
bug correction : in case of metadata (image dimension, filesize) not
registered into database, they couldn't be calculated git-svn-id: http://piwigo.org/svn/trunk@484 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--picture.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/picture.php b/picture.php
index 6ea73e4b9..d08928679 100644
--- a/picture.php
+++ b/picture.php
@@ -363,9 +363,9 @@ else if ( $page['cat'] == 'search' )
}
// calculation of width and height
-if ( empty($picture['current']['width']))
+if (empty($picture['current']['width']))
{
- $taille_image = @getimagesize( $lien_image );
+ $taille_image = @getimagesize($picture['current']['src']);
$original_width = $taille_image[0];
$original_height = $taille_image[1];
}
@@ -528,18 +528,25 @@ $template->assign_block_vars('info_line', array(
'VALUE'=>$picture['current']['file']
));
// filesize
-if ( empty($picture['current']['filesize']))
+if (empty($picture['current']['filesize']))
{
- $poids = floor ( filesize( $picture['current']['url'] ) / 1024 );
+ if (!$picture[$i]['is_picture'])
+ {
+ $filesize = floor(filesize($picture['current']['download'])/1024);
+ }
+ else
+ {
+ $filesize = floor(filesize($picture['current']['src'])/1024);
+ }
}
else
{
- $poids = $picture['current']['filesize'];
+ $filesize = $picture['current']['filesize'];
}
$template->assign_block_vars('info_line', array(
'INFO'=>$lang['filesize'],
- 'VALUE'=>$poids.' KB'
+ 'VALUE'=>$filesize.' KB'
));
// keywords
if ( !empty($picture['current']['keywords']))