Ignore:
Timestamp:
Apr 19, 2006, 1:45:21 AM (18 years ago)
Author:
rvelices
Message:

bug 335: tn_ext, has_high and representative_ext are updated during file
synchronization and not metadata synchronization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/admin/site_reader_remote.php

    r1107 r1203  
    3636var $site_files;
    3737var $insert_attributes;
    38 var $update_attributes;
     38var $metadata_attributes;
    3939
    4040function RemoteSiteReader($url, $listing_url)
     
    4242  $this->site_url = $url;
    4343  $this->insert_attributes = array(
    44     'tn_ext', 'representative_ext', 'has_high'
     44    'tn_ext',
    4545    );
    4646  $this->update_attributes = array(
    47     'representative_ext', 'has_high', 'filesize', 'width', 'height'
     47    'tn_ext', 'representative_ext', 'has_high',
     48    );
     49  $this->metadata_attributes = array(
     50    'filesize', 'width', 'height'
    4851    );
    4952
     
    8689    }
    8790
    88     $this->update_attributes = array_merge(
    89       $this->update_attributes,
     91    $this->metadata_attributes = array_merge(
     92      $this->metadata_attributes,
    9093      explode(',', getAttribute($info_xml_element, 'metadata'))
    9194      );
     
    155158
    156159// returns the name of the attributes that are supported for
    157 // update/synchronization according to listing.xml
     160// files update/synchronization
    158161function get_update_attributes()
    159162{
     
    161164}
    162165
    163 // returns a hash of attributes (metadata+filesize+width,...) for file
    164166function get_element_update_attributes($file)
    165167{
     
    167169    $file,
    168170    $this->update_attributes
     171    );
     172}
     173
     174// returns the name of the attributes that are supported for
     175// metadata update/synchronization according to listing.xml
     176function get_metadata_attributes()
     177{
     178  return $this->metadata_attributes;
     179}
     180
     181// returns a hash of attributes (metadata+width,...) for file
     182function get_element_metadata($file)
     183{
     184  return $this->get_element_attributes(
     185    $file,
     186    $this->metadata_attributes
    169187    );
    170188}
Note: See TracChangeset for help on using the changeset viewer.