aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_reader_remote.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-18 23:46:53 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-18 23:46:53 +0000
commit94c39903dcc29879c8827dfd398af9434c1dc95e (patch)
tree879c782b797ac0451fb99e61dc5c8ce64858474e /admin/site_reader_remote.php
parent8e4c71c4bdac0d4914c7b631b1ff34b90fcb9211 (diff)
merge r1203 from branch-1_6 into trunk
bug 335: tn_ext, has_high and representative_ext are updated during file synchronization and not metadata synchronization git-svn-id: http://piwigo.org/svn/trunk@1204 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/site_reader_remote.php')
-rw-r--r--admin/site_reader_remote.php32
1 files changed, 25 insertions, 7 deletions
diff --git a/admin/site_reader_remote.php b/admin/site_reader_remote.php
index 03ad7d45a..dd0038877 100644
--- a/admin/site_reader_remote.php
+++ b/admin/site_reader_remote.php
@@ -35,16 +35,19 @@ var $listing_url;
var $site_dirs;
var $site_files;
var $insert_attributes;
-var $update_attributes;
+var $metadata_attributes;
function RemoteSiteReader($url, $listing_url)
{
$this->site_url = $url;
$this->insert_attributes = array(
- 'tn_ext', 'representative_ext', 'has_high'
+ 'tn_ext',
);
$this->update_attributes = array(
- 'representative_ext', 'has_high', 'filesize', 'width', 'height'
+ 'tn_ext', 'representative_ext', 'has_high',
+ );
+ $this->metadata_attributes = array(
+ 'filesize', 'width', 'height'
);
if (!isset($listing_url))
@@ -85,8 +88,8 @@ function open()
return false;
}
- $this->update_attributes = array_merge(
- $this->update_attributes,
+ $this->metadata_attributes = array_merge(
+ $this->metadata_attributes,
explode(',', getAttribute($info_xml_element, 'metadata'))
);
@@ -154,13 +157,12 @@ function get_elements($path)
}
// returns the name of the attributes that are supported for
-// update/synchronization according to listing.xml
+// files update/synchronization
function get_update_attributes()
{
return $this->update_attributes;
}
-// returns a hash of attributes (metadata+filesize+width,...) for file
function get_element_update_attributes($file)
{
return $this->get_element_attributes(
@@ -169,6 +171,22 @@ function get_element_update_attributes($file)
);
}
+// returns the name of the attributes that are supported for
+// metadata update/synchronization according to listing.xml
+function get_metadata_attributes()
+{
+ return $this->metadata_attributes;
+}
+
+// returns a hash of attributes (metadata+width,...) for file
+function get_element_metadata($file)
+{
+ return $this->get_element_attributes(
+ $file,
+ $this->metadata_attributes
+ );
+}
+
//-------------------------------------------------- private functions --------
/**
* Returns a hash of image/file attributes