aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-04-08 09:09:13 +0000
committermistic100 <mistic@piwigo.org>2011-04-08 09:09:13 +0000
commit797ddead2ae5f678eee182993023f524f8536d9f (patch)
tree1a21201fd6898948b066d96930ea72a8ecac72a3 /picture.php
parent6e3a69f232d1910f0f780f37c476b25964990f76 (diff)
bug:1791 display hd dimensions instead of websize dimensions
git-svn-id: http://piwigo.org/svn/trunk@10157 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/picture.php b/picture.php
index d111d5301..1484814e2 100644
--- a/picture.php
+++ b/picture.php
@@ -919,6 +919,31 @@ if ($picture['current']['is_picture'] and isset($picture['current']['width']) )
}
}
+// hd size in pixels
+if ($picture['current']['is_picture'] AND $picture['current']['has_high'])
+{
+ if (!empty($picture['current']['high_width']))
+ {
+ $infos['INFO_DIMENSIONS'] = $picture['current']['high_width'].'*'.$picture['current']['high_height'];
+ }
+ else
+ {
+ $hi_size = @getimagesize($hi_url);
+ if ($hi_size !== false)
+ {
+ pwg_query('
+ UPDATE ' . IMAGES_TABLE . '
+ SET
+ high_width = \'' . $hi_size[0].'\',
+ high_height = \''.$hi_size[1] .'\'
+ WHERE id = ' . $picture['current']['id'] . ';
+ ');
+
+ $infos['INFO_DIMENSIONS'] = $hi_size[0].'*'.$hi_size[1];
+ }
+ }
+}
+
// filesize
if (!empty($picture['current']['filesize']))
{
@@ -926,6 +951,13 @@ if (!empty($picture['current']['filesize']))
sprintf(l10n('%d Kb'), $picture['current']['filesize']);
}
+// hd filesize
+if ($picture['current']['has_high'] and !empty($picture['current']['high_filesize']))
+{
+ $infos['INFO_FILESIZE'] =
+ sprintf(l10n('%d Kb'), $picture['current']['high_filesize']);
+}
+
// number of visits
$infos['INFO_VISITS'] = $picture['current']['hit'];