mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
19
picture.php
19
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']))
|
||||
|
||||
Reference in New Issue
Block a user