Ignore:
Timestamp:
Jun 7, 2010, 9:06:20 PM (14 years ago)
Author:
rvelices
Message:

merge r6484 from trunk to branch 2.1

  • revert r6473 and r6475
  • moved call to event format_exif_data earlier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/picture_metadata.inc.php

    r6476 r6485  
    3030if (($conf['show_exif']) and (function_exists('read_exif_data')))
    3131{
    32   $exif = get_exif_data($picture['current']['image_path'], null);
     32  $exif_mapping = array();
     33  foreach ($conf['show_exif_fields'] as $field)
     34  {
     35    $exif_mapping[$field] = $field;
     36  }
     37
     38  $exif = get_exif_data($picture['current']['image_path'], $exif_mapping);
    3339  if (count($exif) == 0 and $picture['current']['has_high'])
    3440  {
    35     $exif = get_exif_data($picture['current']['high_url'], null);
     41    $exif = get_exif_data($picture['current']['high_url'], $exif_mapping);
    3642  }
     43 
    3744  if (count($exif) > 0)
    3845  {
    39     $exif = trigger_event('format_exif_data', $exif, $picture['current'] );
    40 
    4146    $tpl_meta = array(
    4247        'TITLE' => 'EXIF Metadata',
     
    6166      {
    6267        $tokens = explode(';', $field);
    63         if (isset($exif[$tokens[0]][$tokens[1]]))
     68        if (isset($exif[$field]))
    6469        {
    6570          $key = $tokens[1];
    66           if (isset($lang['exif_field_'.$tokens[1]]))
     71          if (isset($lang['exif_field_'.$key]))
    6772          {
    68             $key = $lang['exif_field_'.$tokens[1]];
     73            $key = $lang['exif_field_'.$key];
    6974          }
    70           $tpl_meta['lines'][$key] = $exif[$tokens[0]][$tokens[1]];
     75          $tpl_meta['lines'][$key] = $exif[$field];
    7176        }
    7277      }
Note: See TracChangeset for help on using the changeset viewer.