Changeset 702 for trunk/admin/include


Ignore:
Timestamp:
Jan 17, 2005, 8:10:55 PM (19 years ago)
Author:
plg
Message:
  • bug fixed : only fields corresponding to the metadata synchronization are updated (ie : no update of keywords if use_iptc is off)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_metadata.php

    r675 r702  
    114114  if (count($datas) > 0)
    115115  {
     116    $update_fields = array('filesize','width','height','date_metadata_update');
     117    if ($conf['use_exif'])
     118    {
     119      array_push($update_fields, 'date_creation');
     120    }
     121    if ($conf['use_iptc'])
     122    {
     123      $update_fields = array_merge($update_fields,
     124                                   array_keys($conf['use_iptc_mapping']));
     125    }
     126   
    116127    $fields = array('primary' => array('id'),
    117                     'update'  => array('filesize','width','height','name',
    118                                        'author','comment','date_creation',
    119                                        'keywords','date_metadata_update'));
     128                    'update'  => array_unique($update_fields));
    120129    mass_updates(IMAGES_TABLE, $fields, $datas);
    121130  }
Note: See TracChangeset for help on using the changeset viewer.