aboutsummaryrefslogtreecommitdiffstats
path: root/admin
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 /admin
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 '')
-rw-r--r--admin/include/functions_upload.inc.php6
-rw-r--r--admin/site_reader_local.php9
-rw-r--r--admin/site_reader_remote.php2
3 files changed, 14 insertions, 3 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 24400c5f5..a51a71ae9 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -347,11 +347,15 @@ SELECT
{
$update['has_high'] = 'true';
$update['high_filesize'] = $high_infos['filesize'];
+ $update['high_width'] = $high_infos['width'];
+ $update['high_height'] = $high_infos['height'];
}
else
{
$update['has_high'] = 'false';
$update['high_filesize'] = null;
+ $update['high_width'] = null;
+ $update['high_height'] = null;
}
if (isset($level))
@@ -387,6 +391,8 @@ SELECT
{
$insert['has_high'] = 'true';
$insert['high_filesize'] = $high_infos['filesize'];
+ $insert['high_width'] = $high_infos['width'];
+ $insert['high_height'] = $high_infos['height'];
}
if (isset($level))
diff --git a/admin/site_reader_local.php b/admin/site_reader_local.php
index 5addc3a95..da12e9398 100644
--- a/admin/site_reader_local.php
+++ b/admin/site_reader_local.php
@@ -154,7 +154,7 @@ function get_metadata_attributes()
{
global $conf;
- $update_fields = array('filesize', 'width', 'height', 'high_filesize');
+ $update_fields = array('filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height');
if ($conf['use_exif'])
{
@@ -199,8 +199,13 @@ function get_element_metadata($file, $has_high = false)
if ($has_high)
{
$high_file = dirname($file).'/pwg_high/'.basename($file);
-
$data['high_filesize'] = floor(filesize($high_file)/1024);
+
+ if ($high_size = @getimagesize($high_file))
+ {
+ $data['high_width'] = $high_size[0];
+ $data['high_height'] = $high_size[1];
+ }
}
if ($conf['use_exif'])
diff --git a/admin/site_reader_remote.php b/admin/site_reader_remote.php
index 49fa317e8..3789005cb 100644
--- a/admin/site_reader_remote.php
+++ b/admin/site_reader_remote.php
@@ -43,7 +43,7 @@ function RemoteSiteReader($url, $listing_url)
'tn_ext', 'representative_ext', 'has_high',
);
$this->metadata_attributes = array(
- 'filesize', 'width', 'height', 'high_filesize'
+ 'filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height',
);
if (!isset($listing_url))