aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_reader_remote.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-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