Changeset 6485
- Timestamp:
- Jun 7, 2010, 9:06:20 PM (14 years ago)
- Location:
- branches/2.1/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/include/functions_metadata.inc.php
r6474 r6485 118 118 if ($exif = @read_exif_data($filename)) 119 119 { 120 if ($map != null) 121 { 122 foreach ($map as $key => $field) 123 { 124 if (strpos($field, ';') === false) 125 { 126 if (isset($exif[$field])) 127 { 128 $result[$key] = $exif[$field]; 129 } 130 } 131 else 132 { 133 $tokens = explode(';', $field); 134 if (isset($exif[$tokens[0]][$tokens[1]])) 135 { 136 $result[$key] = $exif[$tokens[0]][$tokens[1]]; 137 } 138 } 139 } 140 } 141 else 142 { 143 $result = $exif; 144 } 120 $exif = trigger_event('format_exif_data', $exif, $filename ); 121 foreach ($map as $key => $field) 122 { 123 if (strpos($field, ';') === false) 124 { 125 if (isset($exif[$field])) 126 { 127 $result[$key] = $exif[$field]; 128 } 129 } 130 else 131 { 132 $tokens = explode(';', $field); 133 if (isset($exif[$tokens[0]][$tokens[1]])) 134 { 135 $result[$key] = $exif[$tokens[0]][$tokens[1]]; 136 } 137 } 138 } 145 139 } 146 140 -
branches/2.1/include/picture_metadata.inc.php
r6476 r6485 30 30 if (($conf['show_exif']) and (function_exists('read_exif_data'))) 31 31 { 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); 33 39 if (count($exif) == 0 and $picture['current']['has_high']) 34 40 { 35 $exif = get_exif_data($picture['current']['high_url'], null);41 $exif = get_exif_data($picture['current']['high_url'], $exif_mapping); 36 42 } 43 37 44 if (count($exif) > 0) 38 45 { 39 $exif = trigger_event('format_exif_data', $exif, $picture['current'] );40 41 46 $tpl_meta = array( 42 47 'TITLE' => 'EXIF Metadata', … … 61 66 { 62 67 $tokens = explode(';', $field); 63 if (isset($exif[$ tokens[0]][$tokens[1]]))68 if (isset($exif[$field])) 64 69 { 65 70 $key = $tokens[1]; 66 if (isset($lang['exif_field_'.$ tokens[1]]))71 if (isset($lang['exif_field_'.$key])) 67 72 { 68 $key = $lang['exif_field_'.$ tokens[1]];73 $key = $lang['exif_field_'.$key]; 69 74 } 70 $tpl_meta['lines'][$key] = $exif[$ tokens[0]][$tokens[1]];75 $tpl_meta['lines'][$key] = $exif[$field]; 71 76 } 72 77 }
Note: See TracChangeset
for help on using the changeset viewer.