Ignore:
Timestamp:
Feb 28, 2006, 2:13:16 AM (18 years ago)
Author:
rvelices
Message:

remake of Remote sites and synchronize: final integration and old code cleanup

fix: xml getAttribute always decodes html entities and added encodeAttribute
function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_reader_remote.php

    • Property svn:eol-style set to native
    r1046 r1058  
    7272  else
    7373  {
    74     array_push($errors, array('path' => $listing_file, 'type' => 'PWG-ERROR-NO-FS'));
     74    array_push($errors, array('path' => $listing_file, 'type' => 'PWG-ERROR-NOLISTING'));
    7575    return false;
    7676  }
     
    9595
    9696/**
    97  * Returns a hash with all elements (images and files) inside the full $path 
     97 * Returns a hash with all elements (images and files) inside the full $path
    9898 * according to listing.xml
    9999 * @param string $path recurse in this directory only
     
    110110      foreach ( $files as $file)
    111111      {
    112         $data = $this->get_element_attributes($file, 
     112        $data = $this->get_element_attributes($file,
    113113                                              $this->insert_attributes);
    114114        $elements[$file] = $data;
     
    120120}
    121121
    122 // returns the name of the attributes that are supported for 
     122// returns the name of the attributes that are supported for
    123123// update/synchronization according to listing.xml
    124124function get_update_attributes()
     
    130130function get_element_update_attributes($file)
    131131{
    132     return $this->get_element_attributes($file, 
     132    return $this->get_element_attributes($file,
    133133                                         $this->update_attributes);
    134134}
     
    138138 * Returns a hash of image/file attributes
    139139 * @param string $file fully qualified file name
    140  * @param array $attributes specifies which attributes to retrieve 
     140 * @param array $attributes specifies which attributes to retrieve
    141141 *  returned
    142142*/
     
    144144{
    145145  $xml_element = $this->site_files[$file];
    146   if ( ! isset($xml_element) ) 
     146  if ( ! isset($xml_element) )
    147147  {
    148148    return null;
     
    153153    if (getAttribute($xml_element, $att) != '')
    154154    {
    155       $val = html_entity_decode( getAttribute($xml_element, $att) );
     155      $val = getAttribute($xml_element, $att);
    156156      $data[$att] = addslashes($val);
    157157    }
Note: See TracChangeset for help on using the changeset viewer.