aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_reader_local.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2007-03-09 16:28:49 +0000
committerplegall <plg@piwigo.org>2007-03-09 16:28:49 +0000
commitb0478ef330b8f729554aec55baa81d9e3d02a063 (patch)
tree2be4688f02ba35fe2297f2b7d7de03e8f9eaf5e2 /admin/site_reader_local.php
parent81030a7ab40a481d6d8c93539162a4a035ea09d1 (diff)
New: #images.high_filesize was added so that we can sum the filesizes in the
filtered history. #images.high_filesize is filled during metadata synchronization. Bug fixed: in getAttribute XML function, when asking "filesize", it was returning high_filesize. The regex was too simple. git-svn-id: http://piwigo.org/svn/trunk@1883 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/site_reader_local.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/admin/site_reader_local.php b/admin/site_reader_local.php
index 4302d9a3e..9159a0b90 100644
--- a/admin/site_reader_local.php
+++ b/admin/site_reader_local.php
@@ -157,7 +157,7 @@ function get_metadata_attributes()
{
global $conf;
- $update_fields = array('filesize', 'width', 'height');
+ $update_fields = array('filesize', 'width', 'height', 'high_filesize');
if ($conf['use_exif'])
{
@@ -181,7 +181,7 @@ function get_metadata_attributes()
}
// returns a hash of attributes (metadata+filesize+width,...) for file
-function get_element_metadata($file)
+function get_element_metadata($file, $has_high = false)
{
global $conf;
if (!is_file($file))
@@ -199,6 +199,13 @@ function get_element_metadata($file)
$data['height'] = $image_size[1];
}
+ if ($has_high)
+ {
+ $high_file = dirname($file).'/pwg_high/'.basename($file);
+
+ $data['high_filesize'] = floor(filesize($high_file)/1024);
+ }
+
if ($conf['use_exif'])
{
$data = array_merge($data, get_sync_exif_data($file) );