Index: /extensions/AMetaData/JpegMetaData/Common/XmlData.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/Common/XmlData.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/Common/XmlData.class.php	(revision 17554)
@@ -240,5 +240,5 @@
      * return true of the attribute has been deleted, otherwise false
 
-     * @param String $name : the name the attribute to delete
+     * @param String $name : the name the attribute to delete; if null value is given, delete ALL attributes
      * @return Boolean
      */
@@ -254,4 +254,16 @@
         return(false);
       }
+    }
+
+    /**
+     * delete all attributes
+     * return true of the attribute has been deleted, otherwise false
+     *
+     * @return Boolean
+     */
+    public function delAttributes()
+    {
+      $this->attributes=array();
+      return(true);
     }
 
Index: /extensions/AMetaData/JpegMetaData/External/php-gettext/gettext.inc
===================================================================
--- /extensions/AMetaData/JpegMetaData/External/php-gettext/gettext.inc	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/External/php-gettext/gettext.inc	(revision 17554)
@@ -197,4 +197,8 @@
     global $text_domains;
     // ensure $path ends with a slash ('/' should work for both, but lets still play nice)
+    /*
+      --- some hoster sometimess deactivate the php_uname()
+          in all case, it's better to work with the DIRECTORY_SEPARATOR
+
     if (substr(php_uname(), 0, 7) == "Windows") {
       if ($path[strlen($path)-1] != '\\' and $path[strlen($path)-1] != '/')
@@ -204,4 +208,8 @@
         $path .= '/';
     }
+    */
+      if ($path[strlen($path)-1] != DIRECTORY_SEPARATOR)
+        $path .= DIRECTORY_SEPARATOR;
+
     if (!array_key_exists($domain, $text_domains)) {
       // Initialize an empty domain object.
Index: /extensions/AMetaData/JpegMetaData/JpegMetaData.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/JpegMetaData.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/JpegMetaData.class.php	(revision 17554)
@@ -3,10 +3,10 @@
  * --:: JPEG MetaDatas ::-------------------------------------------------------
  *
- * Version : 1.1.0
- * Date    : 2010-07-29
+ * Version : 1.1.5
+ * Date    : 2012-08-12
  *
  *  Author    : Grum
  *   email    : grum at piwigo.org
- *   website  : http://photos.grum.fr
+ *   website  : http://www.grum.fr
  *
  *   << May the Little SpaceFrog be with you ! >>
@@ -115,6 +115,26 @@
  * |         |            |     error
  * |         |            |
- * | 1.1.5   | 2011-04-20 | * mantis bug:2222
- * |         |            |   . Division by zero with Exif ShutterSpeedValue
+ * |         |            | * mantis bug:2191
+ * |         |            |   . Array to string conversion message on MagicTag "Author"
+ * |         |            |
+ * | 1.1.5   | 2012-08-05 | * mantis feature:2701
+ * |         |            |   . Camera database is not up to date
+ * |         |            |     . update pentax tags definition (lenses&camera)
+ * |         |            |     . update canon tags definition (lenses&camera)
+ * |         |            |     . update nikon tags definition (lenses)
+ * |         |            |
+ * |         |            | * mantis bug:2702
+ * |         |            |   . Error message displayed when an unknown camera is encountered
+ * |         |            |
+ * |         |            | * mantis bug:2720
+ * |         |            |   . When malformatted XMP rational values encountered,
+ * |         |            |     error message is displayed
+ * |         |            |
+ * |         |            | * mantis bug:2722
+ * |         |            |   . error message php_uname() function is not available
+ * |         |            |
+ * |         |            |
+ * |         |            |
+ * |         |            |
  * |         |            |
  * |         |            |
Index: /extensions/AMetaData/JpegMetaData/Readers/CanonReader.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/Readers/CanonReader.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/Readers/CanonReader.class.php	(revision 17554)
@@ -141,4 +141,5 @@
            * null terminated strings
            */
+          //print_r($values);
           $returned=ConvertData::toStrings($values);
           break;
@@ -151,10 +152,26 @@
         case 0x0010: // "CanonModelID"
           $tag=$this->tagDef->getTagById(0x0010);
-          $returned=$tag['tagValues.special'][sprintf("0x%08x", $values)];
+          if(isset($tag['tagValues.special'][sprintf("0x%08x", $values)]))
+          {
+            $returned=$tag['tagValues.special'][sprintf("0x%08x", $values)];
+          }
+          else
+          {
+            $returned=sprintf("unknown (0x%08x)", $values);
+          }
+
           unset($tag);
           break;
         case 0x0015: // "SerialNumberFormat"
           $tag=$this->tagDef->getTagById(0x0015);
-          $returned=$tag['tagValues.special'][sprintf("0x%08x", $values)];
+          if(isset($tag['tagValues.special'][sprintf("0x%08x", $values)]))
+          {
+            $returned=$tag['tagValues.special'][sprintf("0x%08x", $values)];
+          }
+          else
+          {
+            $returned=sprintf("unknown (0x%08x)", $values);
+          }
+
           unset($tag);
           break;
Index: /extensions/AMetaData/JpegMetaData/Readers/GpsReader.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/Readers/GpsReader.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/Readers/GpsReader.class.php	(revision 17554)
@@ -78,5 +78,13 @@
       {
         case 0x0000: // Version
-          $returned=sprintf("%d.%d.%d.%d", $values[0], $values[1], $values[2], $values[3]);
+          if(isset($values[0]) and isset($values[1]) and isset($values[2]) and isset($values[3]))
+          {
+            $returned=sprintf("%d.%d.%d.%d", $values[0], $values[1], $values[2], $values[3]);
+          }
+          else
+          {
+            $returned='unknown';
+          }
+
           break;
         case 0x0001: // GPSLatitudeRef
@@ -102,5 +110,12 @@
            * converted in degrees, minutes and seconds
            */
-          $returned=ConvertData::toDMS($values[0], $values[1], $values[2]);
+          if(isset($values[0]) and isset($values[1]) and isset($values[2]))
+          {
+            $returned=ConvertData::toDMS($values[0], $values[1], $values[2]);
+          }
+          else
+          {
+            $returned="";
+          }
           break;
         case 0x0006: // GPSAltitude
@@ -110,6 +125,13 @@
         case 0x0018: // GPSDestBearing
         case 0x001A: // GPSDestDistance
-          if($values[1]==0) $values[1]=1;
-          $returned=round($values[0]/$values[1],2);
+          if(isset($values[0]) and isset($values[1]))
+          {
+            if($values[1]==0) $values[1]=1;
+            $returned=round($values[0]/$values[1],2);
+          }
+          else
+          {
+            $returned=0;
+          }
           break;
         case 0x0008: // GPSSatellites
Index: /extensions/AMetaData/JpegMetaData/Readers/NikonReader.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/Readers/NikonReader.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/Readers/NikonReader.class.php	(revision 17554)
@@ -491,5 +491,5 @@
      * Nikon encrypt some data
      * This function is used to decrypt them. Don't ask anything about "how does
-     * it work" abd "what's it doing", I just translated the C++ & Perl code
+     * it work" and "what's it doing", I just translated the C++ & Perl code
      * from Exiv2, Exiftool & Raw Photo Parser (Copyright 2004-2006 Dave Coffin)
      *
Index: /extensions/AMetaData/JpegMetaData/Readers/XmpReader.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/Readers/XmpReader.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/Readers/XmpReader.class.php	(revision 17554)
@@ -247,6 +247,13 @@
               break;
           }
+
+          $types=array('simple', 'seq', 'bag', 'alt');
+          $tagProperties=$this->tagDef->getTagById($node->getName());
+
           if($type=="seq" or $type=="bag" or $type=="alt")
           {
+            if($type!=$types[$tagProperties['type']])
+              $type=$types[$tagProperties['type']]; // if container type is not accorded with XMP schema, force it to right value
+
             $value=Array('type' => $type, 'values' => Array());
             $childNode=$child->getFirstChild();
@@ -270,4 +277,5 @@
                 else
                 {
+                  $childNode->delAttributes(); // remove all attributes => only 'alt' type can have attributes
                   $value['values'][]=$childNode->getValue();
                 }
@@ -454,4 +462,5 @@
         case "Iptc4xmpCore:IntellectualGenre":
           $returned=explode(":", $value);
+          if(!is_array($returned)) $returned=array($returned); // force the value to be an array
           break;
         case "exif:GPSLatitude":
@@ -460,25 +469,38 @@
         case "exif:GPSDestLongitude":
           $returned=Array('coord' => "", 'card'=>"");
+
           preg_match_all('/(\d{1,3}),(\d{1,2})(?:\.(\d*)){0,1}(N|S|E|W)/', $value, $result);
-          $returned['coord']=$result[1][0]."° ".$result[2][0]."' ";
-          if(trim($result[3][0])!="")
-          {
-            $returned['coord'].= round(("0.".$result[3][0])*60,2)."\"";
-          }
-          switch($result[4][0])
-          {
-            case "N":
-              $returned['card']="North";
-              break;
-            case "S":
-              $returned['card']="South";
-              break;
-            case "E":
-              $returned['card']="East";
-              break;
-            case "W":
-              $returned['card']="West";
-              break;
-          }
+          if(is_array($result) and
+             isset($result[1]) and
+             isset($result[2]) and
+             isset($result[3]) and
+             isset($result[4]) and
+             isset($result[1][0]) and
+             isset($result[2][0]) and
+             isset($result[3][0]) and
+             isset($result[4][0]))
+          {
+            $returned['coord']=$result[1][0]."° ".$result[2][0]."' ";
+            if(trim($result[3][0])!="")
+            {
+              $returned['coord'].= round(("0.".$result[3][0])*60,2)."\"";
+            }
+            switch($result[4][0])
+            {
+              case "N":
+                $returned['card']="North";
+                break;
+              case "S":
+                $returned['card']="South";
+                break;
+              case "E":
+                $returned['card']="East";
+                break;
+              case "W":
+                $returned['card']="West";
+                break;
+            }
+          }
+
           $type=ByteType::UNDEFINED;
           break;
@@ -617,5 +639,12 @@
         case "exif:GPSAltitudeRef":
         case "exif:GPSDifferential":
-          $returned=(int)$xmpValue;
+          if(is_int($xmpValue))
+          {
+            $returned=(int)$xmpValue;
+          }
+          else
+          {
+            $returned=0;
+          }
           $type=ByteType::ULONG;
           break;
@@ -666,5 +695,12 @@
         case "exif:GPSDestDistance":
           $computed=explode("/", $xmpValue);
-          $returned=Array((int)$computed[0], (int)$computed[1]);
+          if(is_array($computed) and is_int($computed[0]) and is_int($computed[1]))
+          {
+            $returned=Array((int)$computed[0], (int)$computed[1]);
+          }
+          else
+          {
+            $returned=array(0,1);
+          }
           $type=ByteType::URATIONAL;
           unset($computed);
Index: /extensions/AMetaData/JpegMetaData/TagDefinitions/CanonTags.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/TagDefinitions/CanonTags.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/TagDefinitions/CanonTags.class.php	(revision 17554)
@@ -5,5 +5,5 @@
  *  Author    : Grum
  *   email    : grum at piwigo.org
- *   website  : http://photos.grum.fr
+ *   website  : http://www.grum.fr
  *
  *   << May the Little SpaceFrog be with you ! >>
@@ -651,7 +651,16 @@
               249 => "Canon EF 800mm f/5.6L IS",
               250 => "Canon EF 24 f/1.4L II",
+              251 => "Canon EF 70-200mm f/2.8L IS II USM",
+              252 => "Canon EF 70-200mm f/2.8L IS II USM + 1.4x",
+              253 => "Canon EF 70-200mm f/2.8L IS II USM + 2x",
               254 => "Canon EF 100mm f/2.8L Macro IS USM",
               488 => "Canon EF-S 15-85mm f/3.5-5.6 IS USM",
-        ),
+              489 => "Canon EF 70-300mm f/4-5.6L IS USM",
+              490 => "Canon EF 8-15mm f/4L USM",
+              491 => "Canon EF 300mm f/2.8L IS II USM",
+              494 => "Canon EF 600mm f/4.0L IS II USM",
+              495 => "Canon EF 24-70mm f/2.8L II USM",
+              4144 => "Canon EF 40mm f/2.8 STM"
+        )
       ),
 
@@ -1782,13 +1791,34 @@
             '0x02870000' => "PowerShot SX210 IS",
             '0x03010000' => "PowerShot Pro90 IS",
+            '0x03020000' => "Digital IXUS 115 HS",  // added from forum
             '0x04040000' => "PowerShot G1",
             '0x06040000' => "PowerShot S100 / Digital IXUS / IXY Digital",
+            '0x4007d673' => "DC19/DC21/DC22",
+            '0x4007d674' => "XH A1",
             '0x4007d675' => "HV10",
+            '0x4007d676' => "MD130/MD140/MD150/MD160/ZR850",
             '0x4007d777' => "iVIS DC50",
             '0x4007d778' => "iVIS HV20",
             '0x4007d779' => "DC211",
             '0x4007d77b' => "iVIS HR10",
+            '0x4007d77d' => "MD255/ZR950",
+            '0x4007d81c' => "HF11",
+            '0x4007d878' => "HV30",
+            '0x4007d87c' => "XH A1S",
+            '0x4007d87e' => "DC301/DC310/DC311/DC320/DC330",
             '0x4007d87f' => "FS100",
             '0x4007d880' => "iVIS HF10",
+            '0x4007d882' => "HG20/HG21",
+            '0x4007d925' => "HF21",
+            '0x4007d926' => "HF S11",
+            '0x4007d978' => "HV40",
+            '0x4007d987' => "DC410/DC411/DC420",
+            '0x4007d988' => "FS19/FS20/FS21/FS22/FS200",
+            '0x4007d989' => "HF20/HF200",
+            '0x4007d98a' => "HF S10/S100",
+            '0x4007da8e' => "HF R10/R16/R17/R18/R100/R106",
+            '0x4007da8f' => "HF M30/M31/M36/M300/M306",
+            '0x4007da90' => "HF S20/S21/S200",
+            '0x4007da92' => "FS31/FS36/FS37/FS300/FS305/FS306/FS307",
             '0x80000001' => "EOS-1D",
             '0x80000167' => "EOS-1DS",
@@ -1805,13 +1835,26 @@
             '0x80000215' => "EOS-1Ds Mark III",
             '0x80000218' => "EOS 5D Mark II",
+            '0x80000219' => "WFT-E1",
             '0x80000232' => "EOS-1D Mark II N",
             '0x80000234' => "EOS 30D",
             '0x80000236' => "EOS Digital Rebel XTi / 400D / Kiss Digital X (and rare K236)",
+            '0x80000241' => "WFT-E2",
+            '0x80000246' => "WFT-E3",
             '0x80000250' => "EOS 7D",
             '0x80000252' => "EOS Rebel T1i / 500D / Kiss X3",
             '0x80000254' => "EOS Rebel XS / 1000D / Kiss F",
             '0x80000261' => "EOS 50D",
+            '0x80000269' => "EOS-1D X",
             '0x80000270' => "EOS Rebel T2i / 550D / Kiss X4",
+            '0x80000271' => "WFT-E4",
+            '0x80000273' => "WFT-E5",
             '0x80000281' => "EOS-1D Mark IV",
+            '0x80000285' => "EOS 5D Mark III",
+            '0x80000286' => "EOS Rebel T3i / 600D / Kiss X5",
+            '0x80000287' => "EOS 60D",
+            '0x80000288' => "EOS Rebel T3 / 1100D / Kiss X50",
+            '0x80000297' => "WFT-E2 II",
+            '0x80000298' => "WFT-E4 II",
+            '0x80000301' => "EOS Rebel T4i / 650D / Kiss X6i"
         ),
       ), // < CanonModelID
Index: /extensions/AMetaData/JpegMetaData/TagDefinitions/NikonTags.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/TagDefinitions/NikonTags.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/TagDefinitions/NikonTags.class.php	(revision 17554)
@@ -847,5 +847,5 @@
           '8A 54 6A 6A 24 24 8C 0E' => 'AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED',
           '8B 40 2D 80 2C 3C 8D 0E' => 'AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED',
-          '8B 40 2D 80 2C 3C FD 0E' => 'AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED (II)',
+          '8B 40 2D 80 2C 3C FD 0E' => 'AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]',
           '8C 40 2D 53 2C 3C 8E 06' => 'AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED',
           '8D 44 5C 8E 34 3C 8F 0E' => 'AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED',
@@ -913,5 +913,5 @@
           'F0 38 1F 37 34 3C 4B 06' => 'Sigma 12-24mm F4.5-5.6 EX DG Aspherical HSM',
           '26 40 27 3F 2C 34 1C 02' => 'Sigma 15-30mm F3.5-4.5 EX DG Aspherical DF',
-          '48 48 2B 44 24 30 4B 06' => 'Sigma 17-35mm F2.8-4 EX DG  Aspherical HSM',
+          '48 48 2B 44 24 30 4B 06' => 'Sigma 17-35mm F2.8-4 EX DG Aspherical HSM',
           '26 54 2B 44 24 30 1C 02' => 'Sigma 17-35mm F2.8-4 EX Aspherical',
           '7A 47 2B 5C 24 34 4B 06' => 'Sigma 17-70mm F2.8-4.5 DC Macro Asp. IF HSM',
@@ -977,5 +977,5 @@
           'CE 34 76 A0 38 40 4B 0E' => 'Sigma 150-500mm F5-6.3 DG OS APO HSM',
           '26 40 7B A0 34 40 1C 02' => 'Sigma APO 170-500mm F5-6.3 Aspherical RF',
-          '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800 F5.6 EX DG HSM',
+          '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800mm F5.6 EX DG HSM',
           'F4 54 56 56 18 18 84 06' => 'Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)',
           '1E 5D 64 64 20 20 13 00' => 'Tamron SP AF 90mm f/2.5 (52E)',
@@ -1058,4 +1058,80 @@
           '00 4C 6A 6A 20 20 00 00' => 'Nikkor 105mm f/2.5 AiS',
           '00 48 80 80 30 30 00 00' => 'Nikkor 200mm f/4 AiS',
+          '00 00 48 48 53 53 00 01' => "Loreo 40mm F11-22 3D Lens in a Cap 9005",
+          '00 40 2D 2D 2C 2C 00 00' => "Carl Zeiss Distagon T* 3.5/18 ZF.2",
+          '00 40 37 80 2C 3C 00 02' => "Tokina AT-X 242 AF (AF 24-200mm f/3.5-5.6)",
+          '00 40 64 64 2C 2C 00 00' => "Voigtlander APO-Lanthar 90mm F3.5 SLII Close Focus",
+          '00 47 25 25 24 24 00 02' => "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)",
+          '00 48 29 3C 24 24 00 06' => "Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)",
+          '00 48 32 32 24 24 00 00' => "Carl Zeiss Distagon T* 2.8/21 ZF.2",
+          '00 54 3C 3C 18 18 00 00' => "Carl Zeiss Distagon T* 2/28 ZF.2",
+          '00 54 44 44 18 18 00 00' => "Carl Zeiss Distagon T* 2/35 ZF.2",
+          '00 54 50 50 0C 0C 00 00' => "Carl Zeiss Planar T* 1.4/50 ZF.2",
+          '00 54 50 50 18 18 00 00' => "Carl Zeiss Makro-Planar T* 2/50 ZF.2",
+          '00 54 62 62 0C 0C 00 00' => "Carl Zeiss Planar T* 1.4/85 ZF.2",
+          '00 54 68 68 18 18 00 00' => "Carl Zeiss Makro-Planar T* 2/100 ZF.2",
+          '00 58 64 64 20 20 00 00' => "Soligor C/D Macro MC 90mm f/2.5",
+          '02 34 A0 A0 44 44 02 00' => "Sigma APO 500mm F7.2",
+          '02 3C B0 B0 3C 3C 02 00' => "Sigma APO 800mm F5.6",
+          '02 48 50 50 24 24 02 00' => "Sigma Macro 50mm F2.8",
+          '07 40 3C 5C 2C 35 03 00' => "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)",
+          '0A 48 8E 8E 24 24 05 00' => "AF Nikkor 300mm f/2.8 IF-ED N",
+          '12 36 69 97 35 42 09 00' => "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC",
+          '12 3B 98 98 3D 3D 09 00' => "Tokina AT-X 400 AF SD (AF 400mm f/5.6)",
+          '12 44 5E 8E 34 3C 09 00' => "Tokina AF 730 (AF 75-300mm F4.5-5.6)",
+          '14 54 60 80 24 24 0B 00' => "Tokina AT-X 828 AF (AF 80-200mm f/2.8)",
+          '20 5A 64 64 20 20 14 00' => "Tamron SP AF 90mm f/2.5 Macro (152E)",
+          '21 56 8E 8E 24 24 14 00' => "Tamron SP AF 300mm f/2.8 LD-IF (60E)",
+          '22 53 64 64 24 24 E0 02' => "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)",
+          '24 54 60 80 24 24 1A 02' => "Tokina AT-X 828 AF PRO (AF 80-200mm f/2.8)",
+          '25 44 44 8E 34 42 1B 02' => "Tokina AF 353 (AF 35-300mm f/4.5-6.7)",
+          '26 3C 98 98 3C 3C 1C 02' => "Sigma APO Tele Macro 400mm F5.6",
+          '26 40 3C 5C 2C 34 1C 02' => "AF Zoom-Nikkor 28-70mm f/3.5-4.5D",
+          '27 48 8E 8E 30 30 1D 02' => "Tokina AT-X 304 AF (AF 300mm f/4.0)",
+          '27 54 8E 8E 24 24 1D 02' => "Tamron SP AF 300mm f/2.8 LD-IF (360E)",
+          '2E 48 5C 82 30 3C 22 02' => "AF Nikkor 70-210mm f/4-5.6D",
+          '4A 48 24 24 24 0C 4D 02' => "Samyang AE 14mm f/2.8 ED AS IF UMC",
+          '4A 60 44 44 0C 0C 4D 02' => "Samyang 35mm f/1.4 AS UMC",
+          '4A 60 62 62 0C 0C 4D 02' => "Samyang AE 85mm f/1.4 AS IF UMC",
+          '69 47 5C 8E 30 3C 00 02' => "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)",
+          '7A 40 2D 80 2C 40 4B 0E' => "Sigma 18-200mm F3.5-6.3 DC OS HSM",
+          '83 00 B0 B0 5A 5A 88 04' => "FSA-L2, EDG 65, 800mm F13 G",
+          '9B 54 62 62 0C 0C 4B 06' => "Sigma 85mm F1.4 EX DG HSM",
+          '9C 48 5C 80 24 24 4B 0E' => "Sigma 70-200mm F2.8 EX DG OS HSM",
+          '9D 48 2B 50 24 24 4B 0E' => "Sigma 17-50mm F2.8 EX DC OS HSM",
+          '9E 38 11 29 34 3C 4B 06' => "Sigma 8-16mm F4.5-5.6 DC HSM",
+          '9F 37 50 A0 34 40 4B 0E' => "Sigma 50-500mm F4.5-6.3 DG OS HSM",
+          'A3 3C 29 44 30 30 A5 0E' => "AF-S Nikkor 16-35mm f/4G ED VR",
+          'A3 3C 5C 8E 30 3C 4B 0E' => "Sigma 70-300mm F4-5.6 DG OS",
+          'A4 47 2D 50 24 34 4B 0E' => "Sigma 18-50mm F2.8-4.5 DC OS HSM",
+          'A4 54 37 37 0C 0C A6 06' => "AF-S Nikkor 24mm f/1.4G ED",
+          'A5 40 3C 8E 2C 3C A7 0E' => "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR",
+          'A6 48 8E 8E 24 24 A8 0E' => "AF-S VR Nikkor 300mm f/2.8G IF-ED II",
+          'A7 49 80 A0 24 24 4B 06' => "Sigma APO 200-500mm F2.8 EX DG",
+          'A7 4B 62 62 2C 2C A9 0E' => "AF-S DX Micro Nikkor 85mm f/3.5G ED VR",
+          'A8 48 80 98 30 30 AA 0E' => "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II",
+          'A9 54 80 80 18 18 AB 0E' => "AF-S Nikkor 200mm f/2G ED VR II",
+          'AA 3C 37 6E 30 30 AC 0E' => "AF-S Nikkor 24-120mm f/4G ED VR",
+          'AC 38 53 8E 34 3C AE 0E' => "AF-S DX VR Nikkor 55-300mm 4.5-5.6G ED",
+          'AE 54 62 62 0C 0C B0 06' => "AF-S Nikkor 85mm f/1.4G",
+          'AF 54 44 44 0C 0C B1 06' => "AF-S Nikkor 35mm f/1.4G",
+          'B0 4C 50 50 14 14 B2 06' => "AF-S Nikkor 50mm f/1.8G",
+          'B1 48 48 48 24 24 B3 06' => "AF-S DX Micro Nikkor 40mm f/2.8G",
+          'B3 4C 62 62 14 14 B5 06' => "AF-S Nikkor 85mm f/1.8G",
+          'B5 4C 3C 3C 14 14 B7 06' => "AF-S Nikkor 28mm f/1.8G",
+          'E3 54 50 50 24 24 35 02' => "Sigma Macro 50mm F2.8 EX DG",
+          'E6 41 3C 8E 2C 40 1C 02' => "Sigma 28-300mm F3.5-6.3 DG Macro",
+          'F0 3F 2D 8A 2C 40 DF 0E' => "Tamron AF 18-270mm F/3.5-6.3 Di II VC PZD (B008)",
+          'F1 44 A0 A0 34 34 4B 02' => "Sigma APO 500mm F4.5 EX DG HSM",
+          'F1 47 5C 8E 30 3C DF 0E' => "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)",
+          'F3 48 68 8E 30 30 4B 02' => "Sigma APO 100-300mm F4 EX IF HSM",
+          'F6 48 2D 50 24 24 4B 06' => "Sigma 18-50mm F2.8 EX DC Macro",
+          'F7 53 5C 80 24 24 40 06' => "Tamron SP AF 70-200mm F/2.8 Di LD (IF) Macro (A001)",
+          'F8 54 64 64 24 24 DF 06' => "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)",
+          'FA 54 6E 8E 24 24 4B 02' => "Sigma APO 120-300mm F2.8 EX DG HSM",
+          'FB 54 2B 50 24 24 84 06' => "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)",
+          'FC 40 2D 80 2C 40 DF 06' => "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)",
+          'FE 53 5C 80 24 24 84 06' => "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"
+
         )
       ), // < LensData
Index: /extensions/AMetaData/JpegMetaData/TagDefinitions/PentaxTags.class.php
===================================================================
--- /extensions/AMetaData/JpegMetaData/TagDefinitions/PentaxTags.class.php	(revision 17553)
+++ /extensions/AMetaData/JpegMetaData/TagDefinitions/PentaxTags.class.php	(revision 17554)
@@ -91,4 +91,5 @@
           0x12962 => "Optio 450/550",
           0x1296c => "Optio S",
+          0x12971 => "Optio S V1.01",
           0x12994 => "*ist D",
           0x129b2 => "Optio 33L",
@@ -137,17 +138,18 @@
           0x12c3c => "Optio W20",
           0x12c46 => "Optio A20",
-          0x12c8c => "Optio M30",
           0x12c78 => "Optio E30",
           0x12c7d => "Optio E35",
           0x12c82 => "Optio T30",
+          0x12c8c => "Optio M30",
+          0x12c91 => "Optio L30",
           0x12c96 => "Optio W30",
           0x12ca0 => "Optio A30",
           0x12cb4 => "Optio E40",
           0x12cbe => "Optio M40",
+          0x12cc3 => "Optio L40",
+          0x12cc5 => "Optio L36",
           0x12cc8 => "Optio Z10",
-          0x12cdc => "Optio S10",
-          0x12ce6 => "Optio A40",
-          0x12cf0 => "Optio V10",
           0x12cd2 => "K20D",
+          0x12cd4 => "Samsung GX20",
           0x12cdc => "Optio S10",
           0x12ce6 => "Optio A40",
@@ -157,4 +159,5 @@
           0x12d0e => "Optio E50",
           0x12d18 => "Optio M50",
+          0x12d22 => "Optio L50",
           0x12d2c => "Optio V20", //from exiftool
           0x12d40 => "Optio W60", //from exiftool
@@ -164,4 +167,5 @@
           0x12d73 => "K-m", //from exiftool
           0x12d86 => "Optio P70", //from exiftool
+          0x12d90 => "Optio L70", //from exiftool
           0x12d9a => "Optio E70", //from exiftool
           0x12dae => "X70", //from exiftool
@@ -171,4 +175,25 @@
           0x12df4 => "Optio WS80", //from exiftool
           0x12dfe => "K-x", //from exiftool
+          0x12e08 => "645D", //from exiftool
+          0x12e12 => "Optio E80", //from exiftool
+          0x12e30 => "Optio W90", //from exiftool
+          0x12e3a => "Optio I-10", //from exiftool
+          0x12e44 => "Optio H90", //from exiftool
+          0x12e4e => "Optio E90", //from exiftool
+          0x12e58 => "X90", //from exiftool
+          0x12e6c => "K-r", //from exiftool
+          0x12e76 => "K-5", //from exiftool
+          0x12e8a => "Optio RS1000 / RS1500", //from exiftool
+          0x12e94 => "Optio RZ10", //from exiftool
+          0x12e9e => "Optio LS1000", //from exiftool
+          0x12ebc => "Optio WG-1 GPS", //from exiftool
+          0x12ed0 => "Optio S1", //from exiftool
+          0x12ee4 => "Q", //from exiftool
+          0x12ef8 => "K-01", //from exiftool
+          0x12f0c => "Optio RZ18", //from exiftool
+          0x12f16 => "Optio VS20", //from exiftool
+          0x12f2a => "Optio WG-2 GPS", //from exiftool
+          0x12f48 => "Optio LS465", //from exiftool
+          0x12f52 => "K-30", //from exiftool
             )
       ), // < CameraModel
@@ -187,5 +212,6 @@
           3 => "TIFF",
           4 => "RAW",
-          5 => "Premium"
+          5 => "Premium",
+          65535 => "n/a" // from exiftool
         )
       ), // < Quality
@@ -217,5 +243,11 @@
           27 => "3648x2736",
           29 => "4000x3000",
-          37 => "3008x2000"
+          30 => "4288x3216",
+          31 => "4608x3456",
+          129 => "1920x1080", // from exiftool
+          257 => "3216x3216", // from exiftool
+          35 => "2400x1600", // 35 1 ?  // from exiftool
+          36 => "3008x2008 or 3040x2024", // 36 0 ?  // from exiftool
+          37 => "3008x2000", // 37 0 ? // from exiftool
         )
       ), // < Size
@@ -245,4 +277,13 @@
           18 => "Text",
           19 => "Panorama",
+          20 => "3-D", // from exiftool
+          21 => "Black & White", // from exiftool
+          22 => "Sepia", // from exiftool
+          23 => "Red", // from exiftool
+          24 => "Pink", // from exiftool
+          25 => "Purple", // from exiftool
+          26 => "Blue", // from exiftool
+          27 => "Green", // from exiftool
+          28 => "Yellow", // from exiftool
           30 => "Self Portrait",
           31 => "Illustrations",
@@ -265,4 +306,5 @@
           61 => "Blur Reduction",
           65 => "Half-length Portrait",
+          221=> "P", // from exiftool
           255=> "Digital Filter?",
         )
@@ -325,4 +367,7 @@
           17 => "AF-C",
           18 => "AF-A", // from exiftool
+          32 => "Contrast-detect", // from exiftool
+          33 => "Tracking Contrast-detect",  // from exiftool
+          288=> "Face Detect",  // from exiftool
         )
       ), // < Focus
@@ -340,4 +385,5 @@
           0xfffd => "Automatic Tracking AF", //from exiftool
           0xfffc => "Face Recognition AF", //from exiftool
+          0xfffb => "AF Select",  // from exiftool
           1 => "Upper-left",
           2 => "Top",
@@ -406,4 +452,13 @@
           23 => "5000", //from exiftool
           24 => "6400", //from exiftool
+          25 => "8000", //from exiftool
+          26 => "10000", //from exiftool
+          27 => "12800", //from exiftool
+          28 => "16000", //from exiftool
+          29 => "20000", //from exiftool
+          30 => "25600", //from exiftool
+          31 => "32000", //from exiftool
+          32 => "40000", //from exiftool
+          33 => "51200", //from exiftool
 
           50 => "50",
@@ -423,4 +478,12 @@
           269 => "2200", //from exiftool
           270 => "3200", //from exiftool
+          271 => "4500", //from exiftool
+          272 => "6400", //from exiftool
+          273 => "9000", //from exiftool
+          274 => "12800", //from exiftool
+          275 => "18000", //from exiftool
+          276 => "25600", //from exiftool
+          277 => "36000", //from exiftool
+          278 => "51200", //from exiftool
           400 => "400",
           800 => "800",
@@ -505,4 +568,6 @@
           5 => "Very Low",
           6 => "Very High",
+          7 => "-4", //from exiftool
+          8 => "+4", //from exiftool
           65535 => "none", //from exiftool
         )
@@ -523,5 +588,7 @@
           4 => "Med High",
           5 => "Very Low",
-          6 => "Very High"
+          6 => "Very High",
+          7 => "-4", //from exiftool
+          8 => "+4", //from exiftool
         )
       ), // < Contrast
@@ -541,5 +608,7 @@
           4 => "Med Hard",
           5 => "Very Soft",
-          6 => "Very Hard"
+          6 => "Very Hard",
+          7 => "-4", //from exiftool
+          8 => "+4", //from exiftool
         )
       ), // < Sharpness
@@ -638,4 +707,7 @@
           70 => "Lisbon",
           71 => "Copenhagen", // from exiftool
+          72 => "Warsaw",  // from exiftool
+          73 => "Prague",  // from exiftool
+          74 => "Budapest",  // from exiftool
         )
       ), // < City names
@@ -721,4 +793,7 @@
           70 => "Lisbon",
           71 => "Copenhagen", // from exiftool
+          72 => "Warsaw",  // from exiftool
+          73 => "Prague",  // from exiftool
+          74 => "Budapest",  // from exiftool
         )
       ), // < City names
@@ -740,5 +815,4 @@
         )
       ), // < ImageProcessing
-
 
       // PictureMode, tag 0x0033, combi-tag 3 bytes
@@ -773,4 +847,11 @@
           0x001400 => "Stage Lighting", //from exiftool
           0x001500 => "Night Snap", //from exiftool
+          0x001700 => "Blue Sky", //from exiftool
+          0x001800 => "Sunset", //from exiftool
+          0x001a00 => "Night Scene HDR", //from exiftool
+          0x001b00 => "HDR", //from exiftool
+          0x001c00 => "Quick Macro", //from exiftool
+          0x001d00 => "Forest", //from exiftool
+          0x001e00 => "Backlight Silhouette", //from exiftool
         /* AUTO PICT modes (auto-selected) */
           0x010400 => "Auto PICT (Standard)",
@@ -791,4 +872,5 @@
           0x020201 => "DOF Program",
           0x020301 => "MTF Program",
+          0x021601 => "Shallow DOF", //from exiftool
           0x030001 => "Green Mode",
           0x040001 => "Shutter Speed Priority",
@@ -833,8 +915,16 @@
           0x00010000 => "Self-timer (12 sec)",
           0x00020000 => "Self-timer (2 sec)",
+          0x000f0000 => "Video",    // from exiftool
+          0x00100000 => "Mirror Lock-up",   // from exiftool
           0x00ff0000 => "n/a", //from exiftool (K-x ?)
           0x00000100 => "Remote Control (3 sec)",
           0x00000200 => "Remote Control",
+          0x00000400 => "Remote Continuous Shooting",   // from exiftool
           0x00000001 => "Multiple Exposure",
+          0x00000010 => "HDR", // from exiftool
+          0x00000020 => "HDR Strong 1", // from exiftool
+          0x00000030 => "HDR Strong 2", // from exiftool
+          0x00000040 => "HDR Strong 3", // from exiftool
+          0x000000E0 => "HDR Auto", // from exiftool
           0x000000ff => "Video" //from exiftool
         )
@@ -1062,8 +1152,22 @@
           0x07f3 => "smc PENTAX-DA 70mm F2.4 Limited",
           0x07f4 => "smc PENTAX-DA 21mm F3.2 AL Limited",
-          0x08e2 => "smc PENTAX-DA* 55mm F1.4 SDM", //from exiftool
-          0x08e3 => "smc PENTAX DA* 60-250mm F4 [IF] SDM", //from exiftool
-          0x08e8 => "smc PENTAX-DA 17-70mm F4 AL [IF] SDM", //from exiftool
-          0x08ea => "smc PENTAX-DA* 300mm F4ED [IF] SDM",
+          0x0804 => "Sigma 50mm F1.4 EX DG HSM",
+          0x0808 => "Sigma 18-250mm F3.5-6.3 DC OS HSM",
+          0x080b => "Sigma 10-20mm F3.5 EX DC HSM",
+          0x080c => "Sigma 70-300mm F4-5.6 DG OS",
+          0x080d => "Sigma 120-400mm F4.5-5.6 APO DG OS HSM",
+          0x080e => "Sigma 17-70mm F2.8-4.0 DC Macro OS HSM",
+          0x080f => "Sigma 150-500mm F5-6.3 APO DG OS HSM",
+          0x0810 => "Sigma 70-200mm F2.8 EX DG Macro HSM II",
+          0x0811 => "Sigma 50-500mm F4.5-6.3 DG OS HSM",
+          0x0812 => "Sigma 8-16mm F4.5-5.6 DC HSM",
+          0x0815 => "Sigma 17-50mm F2.8 EX DC OS HSM",
+          0x0816 => "Sigma 85mm F1.4 EX DG HSM",
+          0x0817 => "Sigma 70-200mm F2.8 APO EX DG OS HSM",
+          0x08d7 => "smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF] DC WR",
+          0x08e2 => "smc PENTAX-DA* 55mm F1.4 SDM",
+          0x08e3 => "smc PENTAX-DA* 60-250mm F4 [IF] SDM",
+          0x08e8 => "smc PENTAX-DA 17-70mm F4 AL [IF] SDM",
+          0x08ea => "smc PENTAX-DA* 300mm F4 ED [IF] SDM",
           0x08eb => "smc PENTAX-DA* 200mm F2.8 ED [IF] SDM",
           0x08f1 => "smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM",
@@ -1072,5 +1176,22 @@
                       "Sigma 70-200mm F2.8 EX DG Macro HSM II",
                       "Sigma APO 150-500mm F5-6.3 DG OS HSM",
+                      "Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye",
+                      "Sigma 50-200mm F4-5.6 DC OS"
                     ),
+          0x0900 => "645 Manual Lens",
+          0x0a00 => "645 A Series Lens",
+          0x0b04 => "smc PENTAX-FA 645 45-85mm F4.5",
+          0x0b08 => "smc PENTAX-FA 645 80-160mm F4.5",
+          0x0b0b => "smc PENTAX-FA 645 35mm F3.5 AL [IF]",
+          0x0b10 => "smc PENTAX-FA 645 33-55mm F4.5 AL",
+          0x0b11 => "smc PENTAX-FA 645 150-300mm F5.6 ED [IF]",
+          0x0d12 => "smc PENTAX-D FA 645 55mm F2.8 AL [IF] SDM AW",
+          0x0b13 => "smc PENTAX-D FA 645 25mm F4 AL [IF] SDM AW",
+          0x1500 => "Pentax Q Manual Lens",
+          0x1501 => "Standard Prime 8.5mm F1.9",
+          0x1502 => "Standard Zoom 5-15mm F2.8-4.5",
+          0x1503 => "Fish-eye 3.2mm F5.6",
+          0x1504 => "Toy Lens Wide 6.3mm F7.1",
+          0x1505 => "Toy Lens Telephoto 18mm F8",
           0xffff => "Unknown",
         ),
@@ -1091,5 +1212,9 @@
           3 => "Landscape",
           4 => "Vibrant",
-          5 => "Monochrome"
+          5 => "Monochrome",
+          6 => "Muted",
+          7 => "Reversal Film",
+          8 => "Bleach Bypass",
+          9 => "Radiant"
         )
       ), // < ImageTone
Index: /extensions/AMetaData/admin.php
===================================================================
--- /extensions/AMetaData/admin.php	(revision 17553)
+++ /extensions/AMetaData/admin.php	(revision 17554)
@@ -30,5 +30,5 @@
 
 
-if(CommonPlugin::checkGPCRelease(3,2,0))
+if(CommonPlugin::checkGPCRelease(AMD_GPC_NEEDED))
 {
   $config=Array();
Index: /extensions/AMetaData/amd_version.inc.php
===================================================================
--- /extensions/AMetaData/amd_version.inc.php	(revision 17553)
+++ /extensions/AMetaData/amd_version.inc.php	(revision 17554)
@@ -6,5 +6,5 @@
  * Author     : Grum
  *   email    : grum@piwigo.org
- *   website  : http://photos.grum.fr
+ *   website  : http://www.grum.fr
  *   PWG user : http://forum.piwigo.org/profile.php?id=3706
  *
@@ -17,6 +17,6 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('AMD_VERSION',  '0.7.0');
-  define('AMD_VERSION2', '00.07.00');
+  define('AMD_VERSION',  '0.7.1');
+  define('AMD_VERSION2', '00.07.01');
   define('AMD_GPC_NEEDED', '3.5.2');
 ?>
Index: /extensions/AMetaData/main.inc.php
===================================================================
--- /extensions/AMetaData/main.inc.php	(revision 17553)
+++ /extensions/AMetaData/main.inc.php	(revision 17554)
@@ -2,9 +2,9 @@
 /*
 Plugin Name: Advanced MetaData
-Version: 0.7.0
+Version: 0.7.1
 Description: An advanced metadata manager
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=364
 Author: grum@piwigo.org
-Author URI: http://photos.grum.fr/
+Author URI: http://www.grum.fr/
 */
 
@@ -13,5 +13,5 @@
   Author     : Grum
     email    : grum@piwigo.org
-    website  : http://photos.grum.fr
+    website  : http://www.grum.fr
     PWG user : http://forum.piwigo.org/profile.php?id=3706
 
@@ -228,5 +228,19 @@
 |         |            |   . Compatibility with piwigo 2.4
 |         |            |
-|         |            |
+| 0.7.1   | 2012-08-12 | * mantis feature:2701
+|         |            |   . Camera database is not up to date
+|         |            |     . update pentax tags definition (lenses&camera)
+|         |            |     . update canon tags definition (lenses&camera)
+|         |            |     . update nikon tags definition (lenses)
+|         |            |
+|         |            | * mantis bug:2702
+|         |            |   . Error message displayed when an unknown camera is encountered
+|         |            |
+|         |            | * mantis bug:2720
+|         |            |   . When malformatted XMP rational values encountered,
+|         |            |     error message is displayed
+|         |            |
+|         |            | * mantis bug:2722
+|         |            |   . error message php_uname() function is not available
 |         |            |
 |         |            |
