diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-04-18 23:45:21 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-04-18 23:45:21 +0000 |
commit | 1ff16a6cf126d74c3de2ec9796d45428224c0647 (patch) | |
tree | be123d19ab4305c81f99d44006415f73b610c101 /admin/site_reader_remote.php | |
parent | 4c4faad39c987ff3bb7e691b7e7e910cd9058f94 (diff) |
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/branches/branch-1_6@1203 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/site_reader_remote.php')
-rw-r--r-- | admin/site_reader_remote.php | 32 |
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 |