Ignore:
Timestamp:
Sep 10, 2011, 5:02:19 PM (13 years ago)
Author:
cljosse
Message:

[extensions] edit_gmaps add functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/edit_gmaps/admin/include/EXIF.php

    r10060 r12126  
    118118function get_EXIF_JPEG( $filename )
    119119{
    120 global $error_message ;
     120global $erreur_message ;
    121121        // Change: Added as of version 1.11
    122122        // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
     
    124124        {
    125125                // A HTTP or FTP wrapper is being used - show a warning and abort
    126                 $error_message .= "HTTP and FTP wrappers are currently not supported with EXIF - See EXIF functionality documentation - a local file must be specified<br>";
    127                 $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
    128                 $error_message .= "\$newfilename = tempnam ( \$dir, \"tmpexif\" );<br>\n";
    129                 $error_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";
    130130                return FALSE;
    131131        }
     
    168168        {
    169169                // Could't open the file - exit
    170                 $error_message .= "<p>Could not open file $filename</p>\n";
     170                $erreur_message .= "<p>Could not open file $filename</p>\n";
    171171                return FALSE;
    172172        }
     
    297297function get_Meta_JPEG( $filename )
    298298{
    299 global $error_message ;
     299global $erreur_message ;
    300300        // Change: Added as of version 1.11
    301301        // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
     
    303303        {
    304304                // A HTTP or FTP wrapper is being used - show a warning and abort
    305                 $error_message .= "HTTP and FTP wrappers are currently not supported with Meta - See EXIF/Meta functionality documentation - a local file must be specified<br>";
    306                 $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
    307                 $error_message .= "\$newfilename = tempnam ( \$dir, \"tmpmeta\" );<br>\n";
    308                 $error_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";
    309309                return FALSE;
    310310        }
     
    347347        {
    348348                // Could't open the file - exit
    349                 $error_message .= "<p>Could not open file $filename</p>\n";
     349                $erreur_message .= "<p>Could not open file $filename</p>\n";
    350350                return FALSE;
    351351        }
     
    474474function get_EXIF_TIFF( $filename )
    475475{
    476 global $error_message ;
     476global $erreur_message ;
    477477        // Change: Added as of version 1.11
    478478        // Check if a wrapper is being used - these are not currently supported (see notes at top of file)
     
    480480        {
    481481                // A HTTP or FTP wrapper is being used - show a warning and abort
    482                 $error_message .= "HTTP and FTP wrappers are currently not supported with TIFF - See EXIF/TIFF functionality documentation - a local file must be specified<br>";
    483                 $error_message .= "To work on an internet file, copy it locally to start with:<br><br>\n";
    484                 $error_message .= "\$newfilename = tempnam ( \$dir, \"tmptiff\" );<br>\n";
    485                 $error_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";
    486486                return FALSE;
    487487        }
     
    494494        {
    495495                // Could't open the file - exit
    496                 $error_message .= "<p>Could not open file $filename</p>\n";
     496                $erreur_message .= "<p>Could not open file $filename</p>\n";
    497497                return FALSE;
    498498        }
     
    11311131function read_Multiple_IFDs( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE )
    11321132{
    1133 global $error_message ;
     1133global $erreur_message ;
    11341134        // Start at the offset of the first IFD
    11351135        $Next_Offset = 0;
     
    11441144                {
    11451145                        // Error seeking to position of next IFD
    1146                         $error_message .= "<p>Error: Corrupted EXIF</p>\n";
     1146                        $erreur_message .= "<p>Error: Corrupted EXIF</p>\n";
    11471147                        return FALSE;
    11481148                }
     
    11931193function read_IFD_universal( $filehnd, $Tiff_offset, $Byte_Align, $Tag_Definitions_Name, $local_offsets = FALSE, $read_next_ptr = TRUE )
    11941194{
    1195 global $error_message ;
    1196 
     1195global $erreur_message ;
     1196        global $nom_fichier;
     1197       
    11971198        if ( ( $filehnd == NULL ) || ( feof( $filehnd ) ) )
    11981199        {
     
    12131214        // If the data is corrupt, the number of entries may be huge, which will cause errors
    12141215        // This is often caused by a lack of a Next-IFD pointer
    1215         if ( $No_Entries> 10000 )
     1216        if ( $No_Entries> 12800 )
    12161217        {
    12171218                // Huge number of entries - abort
    1218                 $error_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 />";
    12191220
    12201221                return array ( FALSE , 0);
     
    12411242        {
    12421243                // Couldn't read the IFD Data properly, Some Casio files have no Next IFD pointer, hence cause this error
    1243                 $error_message .= "<p>Error: EXIF Corrupted</p>\n";
     1244                $erreur_message .= "<p>Error: EXIF Corrupted</p>\n";
    12441245                return array(FALSE, 0);
    12451246        }
     
    12971298                if ( $Data_Count > 100000 )
    12981299                {
    1299                      //   $error_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";
    13001301
    13011302                        // Some Casio files have no Next IFD pointer, hence cause errors
     
    22092210
    22102211function get_IFD_Data_Type( $input_data, $data_type, $Byte_Align ){
    2211 global $error_message ;
     2212global $erreur_message ;
    22122213        // Check if this is a Unsigned Byte, Unsigned Short or Unsigned Long
    22132214        if (( $data_type == 1 ) || ( $data_type == 3 ) || ( $data_type == 4 ))
     
    22342235                // to return multiple values instead of a single value
    22352236
    2236                 $error_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";
    22372238                return "Error Should never get here"; //explode( "\x00", $input_data );
    22382239        }
Note: See TracChangeset for help on using the changeset viewer.