Changeset 12126 for extensions/edit_gmaps/admin/include/EXIF.php
- Timestamp:
- Sep 10, 2011, 5:02:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/include/EXIF.php
r10060 r12126 118 118 function get_EXIF_JPEG( $filename ) 119 119 { 120 global $err or_message ;120 global $erreur_message ; 121 121 // Change: Added as of version 1.11 122 122 // Check if a wrapper is being used - these are not currently supported (see notes at top of file) … … 124 124 { 125 125 // A HTTP or FTP wrapper is being used - show a warning and abort 126 $err or_message .= "HTTP and FTP wrappers are currently not supported with EXIF - See EXIF functionality documentation - a local file must be specified<br>";127 $err or_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";128 $err or_message .= "\$newfilename = tempnam ( \$dir, \"tmpexif\" );<br>\n";129 $err or_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";126 $erreur_message .= "HTTP and FTP wrappers are currently not supported with EXIF - See EXIF functionality documentation - a local file must be specified<br>"; 127 $erreur_message .= "To work on an internet file, copy it locally to start with:<br><br>\n"; 128 $erreur_message .= "\$newfilename = tempnam ( \$dir, \"tmpexif\" );<br>\n"; 129 $erreur_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n"; 130 130 return FALSE; 131 131 } … … 168 168 { 169 169 // Could't open the file - exit 170 $err or_message .= "<p>Could not open file $filename</p>\n";170 $erreur_message .= "<p>Could not open file $filename</p>\n"; 171 171 return FALSE; 172 172 } … … 297 297 function get_Meta_JPEG( $filename ) 298 298 { 299 global $err or_message ;299 global $erreur_message ; 300 300 // Change: Added as of version 1.11 301 301 // Check if a wrapper is being used - these are not currently supported (see notes at top of file) … … 303 303 { 304 304 // A HTTP or FTP wrapper is being used - show a warning and abort 305 $err or_message .= "HTTP and FTP wrappers are currently not supported with Meta - See EXIF/Meta functionality documentation - a local file must be specified<br>";306 $err or_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";307 $err or_message .= "\$newfilename = tempnam ( \$dir, \"tmpmeta\" );<br>\n";308 $err or_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";305 $erreur_message .= "HTTP and FTP wrappers are currently not supported with Meta - See EXIF/Meta functionality documentation - a local file must be specified<br>"; 306 $erreur_message .= "To work on an internet file, copy it locally to start with:<br><br>\n"; 307 $erreur_message .= "\$newfilename = tempnam ( \$dir, \"tmpmeta\" );<br>\n"; 308 $erreur_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n"; 309 309 return FALSE; 310 310 } … … 347 347 { 348 348 // Could't open the file - exit 349 $err or_message .= "<p>Could not open file $filename</p>\n";349 $erreur_message .= "<p>Could not open file $filename</p>\n"; 350 350 return FALSE; 351 351 } … … 474 474 function get_EXIF_TIFF( $filename ) 475 475 { 476 global $err or_message ;476 global $erreur_message ; 477 477 // Change: Added as of version 1.11 478 478 // Check if a wrapper is being used - these are not currently supported (see notes at top of file) … … 480 480 { 481 481 // A HTTP or FTP wrapper is being used - show a warning and abort 482 $err or_message .= "HTTP and FTP wrappers are currently not supported with TIFF - See EXIF/TIFF functionality documentation - a local file must be specified<br>";483 $err or_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";484 $err or_message .= "\$newfilename = tempnam ( \$dir, \"tmptiff\" );<br>\n";485 $err or_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n";482 $erreur_message .= "HTTP and FTP wrappers are currently not supported with TIFF - See EXIF/TIFF functionality documentation - a local file must be specified<br>"; 483 $erreur_message .= "To work on an internet file, copy it locally to start with:<br><br>\n"; 484 $erreur_message .= "\$newfilename = tempnam ( \$dir, \"tmptiff\" );<br>\n"; 485 $erreur_message .= "copy ( \"http://whatever.com\", \$newfilename );<br><br>\n"; 486 486 return FALSE; 487 487 } … … 494 494 { 495 495 // Could't open the file - exit 496 $err or_message .= "<p>Could not open file $filename</p>\n";496 $erreur_message .= "<p>Could not open file $filename</p>\n"; 497 497 return FALSE; 498 498 } … … 1131 1131 function read_Multiple_IFDs( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE ) 1132 1132 { 1133 global $err or_message ;1133 global $erreur_message ; 1134 1134 // Start at the offset of the first IFD 1135 1135 $Next_Offset = 0; … … 1144 1144 { 1145 1145 // Error seeking to position of next IFD 1146 $err or_message .= "<p>Error: Corrupted EXIF</p>\n";1146 $erreur_message .= "<p>Error: Corrupted EXIF</p>\n"; 1147 1147 return FALSE; 1148 1148 } … … 1193 1193 function read_IFD_universal( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE ) 1194 1194 { 1195 global $error_message ; 1196 1195 global $erreur_message ; 1196 global $nom_fichier; 1197 1197 1198 if ( ( $filehnd == NULL ) || ( feof( $filehnd ) ) ) 1198 1199 { … … 1213 1214 // If the data is corrupt, the number of entries may be huge, which will cause errors 1214 1215 // This is often caused by a lack of a Next-IFD pointer 1215 if ( $No_Entries> 1 0000 )1216 if ( $No_Entries> 12800 ) 1216 1217 { 1217 1218 // Huge number of entries - abort 1218 $err or_message .= "<p>".$No_Entries."Error: huge number of EXIF entries - EXIF is probably Corrupted</p>\n";1219 $erreur_message .= $nom_fichier." Error: huge number (".$No_Entries.") of EXIF entries - EXIF is probably Corrupted.<br />"; 1219 1220 1220 1221 return array ( FALSE , 0); … … 1241 1242 { 1242 1243 // Couldn't read the IFD Data properly, Some Casio files have no Next IFD pointer, hence cause this error 1243 $err or_message .= "<p>Error: EXIF Corrupted</p>\n";1244 $erreur_message .= "<p>Error: EXIF Corrupted</p>\n"; 1244 1245 return array(FALSE, 0); 1245 1246 } … … 1297 1298 if ( $Data_Count > 100000 ) 1298 1299 { 1299 // $err or_message .= "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n";1300 // $erreur_message .= "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n"; 1300 1301 1301 1302 // Some Casio files have no Next IFD pointer, hence cause errors … … 2209 2210 2210 2211 function get_IFD_Data_Type( $input_data, $data_type, $Byte_Align ){ 2211 global $err or_message ;2212 global $erreur_message ; 2212 2213 // Check if this is a Unsigned Byte, Unsigned Short or Unsigned Long 2213 2214 if (( $data_type == 1 ) || ( $data_type == 3 ) || ( $data_type == 4 )) … … 2234 2235 // to return multiple values instead of a single value 2235 2236 2236 $err or_message .= "<p>Error - ASCII Strings should not be processed in get_IFD_Data_Type</p>\n";2237 $erreur_message .= "<p>Error - ASCII Strings should not be processed in get_IFD_Data_Type</p>\n"; 2237 2238 return "Error Should never get here"; //explode( "\x00", $input_data ); 2238 2239 }
Note: See TracChangeset
for help on using the changeset viewer.