Changeset 7399


Ignore:
Timestamp:
Oct 26, 2010, 10:48:08 AM (14 years ago)
Author:
grum
Message:

Fix many bugs
bug:1894, bug:1898, bug:1911, bug:1863, bug:1955, bug:1956, bug:1925

Location:
extensions/AMetaData
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/JpegMetaData/JpegMetaData.class.php

    r6986 r7399  
    6868 * |         |            |
    6969 * |         |            | * mantis bug:1859
    70  * |         |            |   . JpegMetadata class can't manage multiple IPTC keywords
     70 * |         |            |   . JpegMetadata class can't manage multiple IPTC
    7171 * |         |            |     keywords
    7272 * |         |            |
     
    7575 * |         |            |     'Magic' metadata
    7676 * |         |            |
    77  * |         |            |
    78  * |         |            |
    79  * |         |            |
    80  * |         |            |
     77 * | 1.1.3   | 2010-09-30 | * mantis bug:1894
     78 * |         |            |   . Error when filling the metadata repository
     79 * |         |            |
     80 * |         |            | * mantis bug:1898
     81 * |         |            |   . Warning "division by zero" on Canon images
     82 * |         |            |
     83 * |         |            | * mantis bug:1911
     84 * |         |            |   . Unable to read Jpeg file if there is extradata
     85 * |         |            |     after the EOI marker
     86 * |         |            |
     87 * |         |            | * mantis bug:1863
     88 * |         |            |   . Except "keywords" meta, all IPTC meta declared
     89 * |         |            |     as "repeatable" are not managed
     90 * |         |            |
     91 * |         |            | * mantis bug:1955
     92 * |         |            |   . Incorrect mapping for IPTC File format
     93 * |         |            |
     94 * |         |            | * mantis bug:1956
     95 * |         |            |   . IPTC "Subject Reference" is not implemented
    8196 * |         |            |
    8297 * |         |            |
     
    420435               */
    421436              if($data->getNbIFDs()>0 and
    422                  ($this->options['magic'] or $this->options['exif'] or $this->options['maker']))
     437                 ($this->options['magic'] or $this->options['exif']))
    423438              {
    424439                $this->loadIfdTags($data->getIFD(0), Schemas::EXIF_TIFF);
  • extensions/AMetaData/JpegMetaData/Readers/CanonReader.class.php

    r6729 r7399  
    141141           * null terminated strings
    142142           */
     143          print_r($values);
    143144          $returned=ConvertData::toStrings($values);
    144145          break;
     
    233234                  {
    234235                    $focalUnit=(array_key_exists(25, $values))?$values[25]:1;
    235                     $FocalShort=(array_key_exists(24, $values))?$values[24]/$focalUnit:0;
    236                     $FocalLong=(array_key_exists(23, $values))?$values[23]/$focalUnit:0;
     236                    $FocalShort=(array_key_exists(24, $values) && ($focalUnit!=0))?$values[24]/$focalUnit:0;
     237                    $FocalLong=(array_key_exists(23, $values) && ($focalUnit!=0))?$values[23]/$focalUnit:0;
    237238                    $focal=(($FocalShort==$FocalLong or $FocalLong==0)?$FocalShort:$FocalShort."-".$FocalLong)."mm";
    238239
  • extensions/AMetaData/JpegMetaData/Readers/IptcReader.class.php

    r6949 r7399  
    217217      /* for each entries, convert value to human readable tag value
    218218       *
    219        * build a special 'keywords' tag made as an array from all iptc 'keywords' (0x0219) tags found
     219       * repeatable values are stored in arrays
     220       *
     221       * for Subject Reference tags (0x020C), made derived tags (0x020Cnn)
    220222       */
    221       $keywordsTag=null;
     223      $repeatableTags=array();
    222224      foreach($this->entries as $key => $tag)
    223225      {
    224226        $this->setTagProperties($tag);
    225         if($tag->getId()==0x0219)
    226         {
    227           if(is_null($keywordsTag))
    228           {
    229             $keywordsTag=new Tag(
    230               0x0219,
    231               array($tag->getValue()),
    232               $tag->getName(),
    233               array($tag->getLabel()),
    234               "",
    235               $tag->isKnown(),
    236               $tag->isImplemented(),
    237               $tag->isTranslatable(),
    238               $tag->getSchema()
    239             );
    240           }
    241           else
    242           {
    243             $keywordsTag->setValue(array_merge($keywordsTag->getValue(), array($tag->getValue())));
    244             $keywordsTag->setLabel(array_merge($keywordsTag->getLabel(), array($tag->getLabel())));
    245           }
    246         }
    247       }
    248       if(!is_null($keywordsTag))
     227
     228        $list=array();
     229
     230        if($tag->getId()==0x020C)
     231        {
     232          $tmpValues=explode(':', $tag->getValue());
     233          $tmpLabels=explode(':', $tag->getLabel());
     234
     235          $list=array(
     236            array(
     237              'id' => 0x020C,
     238              'value' => $tag->getValue(),
     239              'label' => $tag->getLabel(),
     240            ),
     241            array(
     242              'id' => 0x020C00,
     243              'value' => isset($tmpValues[0])?$tmpValues[0]:'',
     244              'label' => isset($tmpLabels[0])?$tmpLabels[0]:'',
     245            ),
     246            array(
     247              'id' => 0x020C01,
     248              'value' => isset($tmpValues[1])?$tmpValues[1]:'',
     249              'label' => isset($tmpLabels[1])?$tmpLabels[1]:'',
     250            ),
     251            array(
     252              'id' => 0x020C02,
     253              'value' => isset($tmpValues[2])?$tmpValues[2]:'',
     254              'label' => isset($tmpLabels[2])?$tmpLabels[2]:'',
     255            ),
     256            array(
     257              'id' => 0x020C03,
     258              'value' => isset($tmpValues[3])?$tmpValues[3]:'',
     259              'label' => isset($tmpLabels[3])?$tmpLabels[3]:'',
     260            ),
     261            array(
     262              'id' => 0x020C04,
     263              'value' => isset($tmpValues[4])?$tmpValues[4]:'',
     264              'label' => isset($tmpLabels[4])?$tmpLabels[4]:'',
     265            )
     266          );
     267        }
     268        else
     269        {
     270          $list=array(
     271            array(
     272              'id' => $tag->getId(),
     273              'value' => $tag->getValue(),
     274              'label' => $tag->getLabel(),
     275            )
     276          );
     277        }
     278
     279
     280        foreach($list as $tagItem)
     281        {
     282          $tagDef=$this->tagDef->getTagById($tagItem['id']);
     283
     284          if($tagDef['repeatable'])
     285          {
     286            if(!array_key_exists($tagItem['id'], $repeatableTags))
     287            {
     288              $repeatableTags[$tagItem['id']]=new Tag(
     289                $tagItem['id'],
     290                array($tagItem['value']),
     291                $tagDef['tagName'],
     292                array($tagItem['label']),
     293                "",
     294                $tag->isKnown(),
     295                $tagDef['implemented'],
     296                $tagDef['translatable'],
     297                $tag->getSchema()
     298              );
     299            }
     300            else
     301            {
     302              $repeatableTags[$tagItem['id']]->setValue(array_merge($repeatableTags[$tagItem['id']]->getValue(), array($tagItem['value'])));
     303              $repeatableTags[$tagItem['id']]->setLabel(array_merge($repeatableTags[$tagItem['id']]->getLabel(), array($tagItem['label'])));
     304            }
     305          }
     306          unset($tagDef);
     307        }
     308        unset($tagId);
     309      }
     310      foreach($repeatableTags as $key => $tag)
    249311      {
    250312        /*
    251313         * IPTC 'keywords' is stored like XMP 'xmp.dc:subject' (as a 'seq')
    252314         */
    253         $keywordsTag->setValue(
     315        $repeatableTags[$key]->setValue(
    254316          array(
    255317            'type' => 'seq',
    256             'values' => $keywordsTag->getValue()
     318            'values' => $repeatableTags[$key]->getValue()
    257319          )
    258320        );
    259321
    260         $keywordsTag->setLabel(
     322        $repeatableTags[$key]->setLabel(
    261323          array(
    262324            'type' => 'seq',
    263             'values' => $keywordsTag->getLabel()
     325            'values' => $repeatableTags[$key]->getLabel()
    264326          )
    265327        );
    266         $this->entries[]=$keywordsTag;
    267         unset($keywordsTag);
    268       }
     328        $this->entries[]=$repeatableTags[$key];
     329        unset($repeatableTags[$key]);
     330      }
     331      unset($repeatableTags);
    269332    }
    270333
     
    330393        case 0x0205: // 2:05  - Title
    331394        case 0x0207: // 2:07  - Edit Status
     395        case 0x020C: // 2:12 - Subject Reference
    332396        case 0x020F: // 2:15  - Category
    333397        case 0x0214: // 2:20  - Supplemental Category
     
    359423        case 0x0114: // 1:20  - File Format
    360424          $tag=$this->tagDef->getTagById(0x0114);
    361           $returned=$tag['tagValues.special'][ConvertData::toUShort($values, BYTE_ORDER_BIG_ENDIAN)];
     425          $tmpValue=ConvertData::toUShort($values, BYTE_ORDER_BIG_ENDIAN);
     426          if(array_key_exists($tmpValue, $tag['tagValues.special']))
     427          {
     428            $returned=$tag['tagValues.special'][$tmpValue];
     429          }
     430          else
     431          {
     432            $returned='Unknown file format : '.ConvertData::toHexDump($tmpValue, ByteType::USHORT);
     433          }
    362434          unset($tag);
    363435          break;
  • extensions/AMetaData/JpegMetaData/Readers/JpegReader.class.php

    r4972 r7399  
    8585     */
    8686    const JPEG_EOI = 0xFFD9;
     87    /**
     88     * start of scan tag
     89     */
     90    const JPEG_SOS = 0xFFDA;
    8791
    8892
     
    174178      fseek($this->fileHandler, -2, SEEK_END);
    175179      $header=fread($this->fileHandler, 2);
    176       if(ConvertData::toUShort($header, BYTE_ORDER_BIG_ENDIAN) == self::JPEG_EOI)
    177       {
    178         /*
    179          * the file ends with the good marker
    180          */
    181         fseek($this->fileHandler, 0);
    182         $header=fread($this->fileHandler, 2);
    183         if(ConvertData::toUShort($header, BYTE_ORDER_BIG_ENDIAN) == self::JPEG_SOI)
    184         {
    185           return(true);
     180      $haveEOI=(ConvertData::toUShort($header, BYTE_ORDER_BIG_ENDIAN) == self::JPEG_EOI);
     181
     182      // look if 2 first bytes of file are SOI
     183      fseek($this->fileHandler, 0);
     184      $header=fread($this->fileHandler, 2);
     185      if(ConvertData::toUShort($header, BYTE_ORDER_BIG_ENDIAN) == self::JPEG_SOI)
     186      {
     187        //if file have EOI, it seems to be a valid JPEG file
     188        if($haveEOI) return(true);
     189
     190        // otherwise, try to find SOS
     191        while(!feof($this->fileHandler))
     192        {
     193          $header=ConvertData::toUShort(fread($this->fileHandler, 2), BYTE_ORDER_BIG_ENDIAN);
     194
     195          if($header==self::JPEG_EOI or $header==self::JPEG_SOS )
     196          {
     197            //seems to be a valid JPEG file
     198            return(true);
     199          }
     200          elseif($header>>8==0xFF)
     201          {
     202            //seems to be a valid marker, jump to next marker...
     203            $sizeBlock=ConvertData::toUShort(fread($this->fileHandler, 2), BYTE_ORDER_BIG_ENDIAN);
     204            fseek($this->fileHandler, $sizeBlock-2, SEEK_CUR);
     205          }
     206          else
     207          {
     208            // not a marker, not e JPEG file
     209            return(false);
     210          }
    186211        }
    187212      }
  • extensions/AMetaData/JpegMetaData/TagDefinitions/IptcTags.class.php

    r5222 r7399  
    5858        'implemented'  => false,
    5959        'translatable' => false,
     60        'repeatable' => false,
    6061      ),
    6162
     
    6465        'implemented'  => true,
    6566        'translatable' => false,
     67        'repeatable' => true,
    6668      ),
    6769
     
    8183          0x0008 => "IPTC Unstructured Character Oriented File Format (UCOFF)",
    8284          0x0009 => "United Press International ANPA 1312 variant",
    83           0x0010 => "United Press International Down-Load Message",
    84           0x0011 => "JPEG File Interchange (JFIF)",
    85           0x0012 => "Photo-CD Image-Pac (Eastman Kodak)",
    86           0x0013 => "Microsoft Bit Mapped Graphics File [*.BMP]",
    87           0x0014 => "Digital Audio File [*.WAV] (Microsoft & Creative Labs)",
    88           0x0015 => "Audio plus Moving Video [*.AVI] (Microsoft)",
    89           0x0016 => "PC DOS/Windows Executable Files [*.COM][*.EXE]",
    90           0x0017 => "Compressed Binary File [*.ZIP] (PKWare Inc)",
    91           0x0018 => "Audio Interchange File Format AIFF (Apple Computer Inc)",
    92           0x0019 => "RIFF Wave (Microsoft Corporation)",
    93           0x0020 => "Freehand (Macromedia/Aldus)",
    94           0x0021 => "Hypertext Markup Language 'HTML' (The Internet Society)",
    95           0x0022 => "MPEG 2 Audio Layer 2 (Musicom), ISO/IEC",
    96           0x0023 => "MPEG 2 Audio Layer 3, ISO/IEC",
    97           0x0024 => "Portable Document File (*.PDF) Adobe",
    98           0x0025 => "News Industry Text Format (NITF)",
    99           0x0026 => "Tape Archive (*.TAR)",
    100           0x0027 => "Tidningarnas Telegrambyrå NITF version (TTNITF DTD)",
    101           0x0028 => "Ritzaus Bureau NITF version (RBNITF DTD)",
    102           0x0029 => "Corel Draw [*.CDR]",
     85          0x000A => "United Press International Down-Load Message",
     86          0x000B => "JPEG File Interchange (JFIF)",
     87          0x000C => "Photo-CD Image-Pac (Eastman Kodak)",
     88          0x000D => "Microsoft Bit Mapped Graphics File [*.BMP]",
     89          0x000E => "Digital Audio File [*.WAV] (Microsoft & Creative Labs)",
     90          0x000F => "Audio plus Moving Video [*.AVI] (Microsoft)",
     91          0x0010 => "PC DOS/Windows Executable Files [*.COM][*.EXE]",
     92          0x0011 => "Compressed Binary File [*.ZIP] (PKWare Inc)",
     93          0x0012 => "Audio Interchange File Format AIFF (Apple Computer Inc)",
     94          0x0013 => "RIFF Wave (Microsoft Corporation)",
     95          0x0014 => "Freehand (Macromedia/Aldus)",
     96          0x0015 => "Hypertext Markup Language 'HTML' (The Internet Society)",
     97          0x0016 => "MPEG 2 Audio Layer 2 (Musicom), ISO/IEC",
     98          0x0017 => "MPEG 2 Audio Layer 3, ISO/IEC",
     99          0x0018 => "Portable Document File (*.PDF) Adobe",
     100          0x0019 => "News Industry Text Format (NITF)",
     101          0x001A => "Tape Archive (*.TAR)",
     102          0x001B => "Tidningarnas Telegrambyrå NITF version (TTNITF DTD)",
     103          0x001C => "Ritzaus Bureau NITF version (RBNITF DTD)",
     104          0x001D => "Corel Draw [*.CDR]",
    103105        ),
     106        'repeatable' => false,
    104107      ),
    105108
     
    108111        'implemented'  => false,
    109112        'translatable' => false,
     113        'repeatable' => false,
    110114      ),
    111115
     
    114118        'implemented'  => true,
    115119        'translatable' => false,
     120        'repeatable' => false,
    116121      ),
    117122
     
    121126        'implemented'  => true,
    122127        'translatable' => false,
     128        'repeatable' => false,
    123129      ),
    124130
     
    127133        'implemented'  => true,
    128134        'translatable' => false,
     135        'repeatable' => true,
    129136      ),
    130137
     
    133140        'implemented'  => true,
    134141        'translatable' => true,
     142        'repeatable' => false,
    135143        'tagValues'    => Array(
    136144           '0' => 'none',
     
    150158        'implemented'  => true,
    151159        'translatable' => false,
     160        'repeatable' => false,
    152161      ),
    153162
     
    156165        'implemented'  => true,
    157166        'translatable' => false,
     167        'repeatable' => false,
    158168      ),
    159169
     
    162172        'implemented'  => false,
    163173        'translatable' => false,
     174        'repeatable' => false,
    164175      ),
    165176
     
    168179        'implemented'  => false,
    169180        'translatable' => false,
     181        'repeatable' => false,
    170182      ),
    171183
     
    174186        'implemented'  => false,
    175187        'translatable' => false,
     188        'repeatable' => false,
    176189      ),
    177190
     
    180193        'implemented'  => false,
    181194        'translatable' => false,
     195        'repeatable' => false,
    182196      ),
    183197
     
    186200        'implemented'  => false,
    187201        'translatable' => false,
     202        'repeatable' => false,
    188203      ),
    189204
     
    192207        'implemented'  => true,
    193208        'translatable' => false,
     209        'repeatable' => false,
    194210      ),
    195211
     
    198214        'implemented'  => true,
    199215        'translatable' => false,
     216        'repeatable' => true,
    200217      ),
    201218
     
    204221        'implemented'  => true,
    205222        'translatable' => false,
     223        'repeatable' => false,
    206224      ),
    207225
     
    210228        'implemented'  => true,
    211229        'translatable' => false,
     230        'repeatable' => false,
    212231      ),
    213232
     
    216235        'implemented'  => false,
    217236        'translatable' => false,
     237        'repeatable' => false,
    218238      ),
    219239
     
    222242        'implemented'  => true,
    223243        'translatable' => true,
     244        'repeatable' => false,
    224245        'tagValues'    => Array(
    225246           '0' => 'none',
     
    238259      0x020C => Array( //2:12
    239260        'tagName'      => "Subject Reference",
    240         'implemented'  => false,
    241         'translatable' => false,
    242       ),
     261        'implemented'  => true,
     262        'translatable' => false,
     263        'repeatable' => true,
     264      ),
     265
     266      0x020C00 => Array( //2:12:00 --> fake code, not in IPTC Spec.
     267        'tagName'      => "Subject Reference[IPR]",
     268        'implemented'  => true,
     269        'translatable' => false,
     270        'repeatable' => true,
     271      ),
     272      0x020C01 => Array( //2:12:01 --> fake code, not in IPTC Spec.
     273        'tagName'      => "Subject Reference[Number]",
     274        'implemented'  => true,
     275        'translatable' => false,
     276        'repeatable' => true,
     277      ),
     278      0x020C02 => Array( //2:12:02 --> fake code, not in IPTC Spec.
     279        'tagName'      => "Subject Reference[Name]",
     280        'implemented'  => true,
     281        'translatable' => false,
     282        'repeatable' => true,
     283      ),
     284      0x020C03 => Array( //2:12:03 --> fake code, not in IPTC Spec.
     285        'tagName'      => "Subject Reference[Matter Name]",
     286        'implemented'  => true,
     287        'translatable' => false,
     288        'repeatable' => true,
     289      ),
     290      0x020C04 => Array( //2:12:04 --> fake code, not in IPTC Spec.
     291        'tagName'      => "Subject Reference[Detail Name]",
     292        'implemented'  => true,
     293        'translatable' => false,
     294        'repeatable' => true,
     295      ),
     296
    243297
    244298      0x020F => Array( //2:15
     
    246300        'implemented'  => true,
    247301        'translatable' => false,
     302        'repeatable' => false,
    248303      ),
    249304
     
    252307        'implemented'  => true,
    253308        'translatable' => false,
     309        'repeatable' => true,
    254310      ),
    255311
     
    258314        'implemented'  => true,
    259315        'translatable' => false,
     316        'repeatable' => false,
    260317      ),
    261318
     
    264321        'implemented'  => true,
    265322        'translatable' => false,
     323        'repeatable' => true,
    266324      ),
    267325
     
    270328        'implemented'  => true,
    271329        'translatable' => false,
     330        'repeatable' => true,
    272331      ),
    273332
     
    276335        'implemented'  => true,
    277336        'translatable' => false,
     337        'repeatable' => true,
    278338      ),
    279339
     
    282342        'implemented'  => true,
    283343        'translatable' => false,
     344        'repeatable' => false,
    284345      ),
    285346
     
    288349        'implemented'  => true,
    289350        'translatable' => false,
     351        'repeatable' => false,
    290352      ),
    291353
     
    294356        'implemented'  => true,
    295357        'translatable' => false,
     358        'repeatable' => false,
    296359      ),
    297360
     
    300363        'implemented'  => true,
    301364        'translatable' => false,
     365        'repeatable' => false,
    302366      ),
    303367
     
    306370        'implemented'  => true,
    307371        'translatable' => false,
     372        'repeatable' => false,
    308373      ),
    309374
     
    312377        'implemented'  => false,
    313378        'translatable' => false,
     379        'repeatable' => false,
    314380      ),
    315381
     
    318384        'implemented'  => false,
    319385        'translatable' => false,
     386        'repeatable' => false,
    320387      ),
    321388
     
    324391        'implemented'  => false,
    325392        'translatable' => false,
     393        'repeatable' => true,
    326394      ),
    327395
     
    330398        'implemented'  => false,
    331399        'translatable' => false,
     400        'repeatable' => true,
    332401      ),
    333402
     
    336405        'implemented'  => true,
    337406        'translatable' => false,
     407        'repeatable' => false,
    338408      ),
    339409
     
    342412        'implemented'  => true,
    343413        'translatable' => false,
     414        'repeatable' => false,
    344415      ),
    345416
     
    348419        'implemented'  => true,
    349420        'translatable' => false,
     421        'repeatable' => false,
    350422      ),
    351423
     
    354426        'implemented'  => true,
    355427        'translatable' => false,
     428        'repeatable' => false,
    356429      ),
    357430
     
    360433        'implemented'  => true,
    361434        'translatable' => false,
     435        'repeatable' => false,
    362436      ),
    363437
     
    366440        'implemented'  => true,
    367441        'translatable' => false,
     442        'repeatable' => false,
    368443      ),
    369444
     
    372447        'implemented'  => true,
    373448        'translatable' => true,
     449        'repeatable' => false,
    374450        'tagValues'    => Array(
    375451          'a' => "morning",
     
    383459        'implemented'  => true,
    384460        'translatable' => false,
     461        'repeatable' => true,
    385462      ),
    386463
     
    389466        'implemented'  => true,
    390467        'translatable' => false,
     468        'repeatable' => true,
    391469      ),
    392470
     
    395473        'implemented'  => true,
    396474        'translatable' => false,
     475        'repeatable' => false,
    397476      ),
    398477
     
    401480        'implemented'  => true,
    402481        'translatable' => false,
     482        'repeatable' => false,
    403483      ),
    404484
     
    407487        'implemented'  => true,
    408488        'translatable' => false,
     489        'repeatable' => false,
    409490      ),
    410491
     
    413494        'implemented'  => true,
    414495        'translatable' => false,
     496        'repeatable' => false,
    415497      ),
    416498
     
    419501        'implemented'  => true,
    420502        'translatable' => false,
     503        'repeatable' => false,
    421504      ),
    422505
     
    425508        'implemented'  => true,
    426509        'translatable' => false,
     510        'repeatable' => false,
    427511      ),
    428512
     
    431515        'implemented'  => true,
    432516        'translatable' => false,
     517        'repeatable' => false,
    433518      ),
    434519
     
    437522        'implemented'  => true,
    438523        'translatable' => false,
     524        'repeatable' => false,
    439525      ),
    440526
     
    443529        'implemented'  => true,
    444530        'translatable' => false,
     531        'repeatable' => false,
    445532      ),
    446533
     
    449536        'implemented'  => true,
    450537        'translatable' => false,
     538        'repeatable' => false,
    451539      ),
    452540
     
    455543        'implemented'  => true,
    456544        'translatable' => false,
     545        'repeatable' => true,
    457546      ),
    458547
     
    461550        'implemented'  => true,
    462551        'translatable' => false,
     552        'repeatable' => false,
    463553      ),
    464554
     
    467557        'implemented'  => true,
    468558        'translatable' => false,
     559        'repeatable' => true,
    469560      ),
    470561
     
    473564        'implemented'  => false,
    474565        'translatable' => false,
     566        'repeatable' => false,
    475567      ),
    476568
     
    479571        'implemented'  => false,
    480572        'translatable' => false,
     573        'repeatable' => false,
    481574        'tagValues.special' => Array(
    482575         0 => Array(
     
    510603        'implemented'  => true,
    511604        'translatable' => true,
     605        'repeatable' => false,
    512606        'tagValues'    => Array(
    513607          'P' => "portrait",
     
    521615        'implemented'  => true,
    522616        'translatable' => false,
     617        'repeatable' => false,
    523618      ),
    524619
     
    527622        'implemented'  => false,
    528623        'translatable' => false,
     624        'repeatable' => false,
    529625      ),
    530626
     
    533629        'implemented'  => false,
    534630        'translatable' => false,
     631        'repeatable' => false,
    535632      ),
    536633
     
    539636        'implemented'  => false,
    540637        'translatable' => false,
     638        'repeatable' => false,
    541639      ),
    542640
     
    545643        'implemented'  => false,
    546644        'translatable' => false,
     645        'repeatable' => false,
    547646      ),
    548647
     
    552651        'implemented'  => false,
    553652        'translatable' => false,
     653        'repeatable' => false,
    554654      ),
    555655
     
    558658        'implemented'  => false,
    559659        'translatable' => false,
     660        'repeatable' => false,
    560661      ),
    561662
     
    564665        'implemented'  => false,
    565666        'translatable' => false,
     667        'repeatable' => false,
    566668      ),
    567669
     
    570672        'implemented'  => false,
    571673        'translatable' => false,
     674        'repeatable' => false,
    572675      ),
    573676
     
    576679        'implemented'  => false,
    577680        'translatable' => false,
     681        'repeatable' => false,
    578682      ),
    579683
     
    582686        'implemented'  => false,
    583687        'translatable' => false,
     688        'repeatable' => false,
    584689      ),
    585690
     
    588693        'implemented'  => false,
    589694        'translatable' => false,
     695        'repeatable' => false,
    590696      ),
    591697
     
    594700        'implemented'  => false,
    595701        'translatable' => false,
     702        'repeatable' => false,
    596703      ),
    597704
     
    600707        'implemented'  => false,
    601708        'translatable' => false,
     709        'repeatable' => true,
    602710      ),
    603711
     
    606714        'implemented'  => false,
    607715        'translatable' => false,
     716        'repeatable' => false,
    608717      ),
    609718    );
  • extensions/AMetaData/admin/amd_metadata_display_groupEdit.tpl

    r4905 r7399  
    2323    {if isset($datasLang.language_list) and count($datasLang.language_list)}
    2424      {foreach from=$datasLang.language_list key=name item=language_row}
    25         <input type='hidden' id='iName_{$name}' value='{$language_row.name}'>
     25        <input type='hidden' id='iName_{$name}' value='{$language_row.name}' size=60 maxlength =80>
    2626      {/foreach}
    2727    {/if}
  • extensions/AMetaData/admin/amd_metadata_personnal.tpl

    r6950 r7399  
    8181        .bind('dialogopen', function ()
    8282          {
    83             if(options.id!='')
     83            if(options.numId!='')
    8484            {
    8585              displayProcessing(true);
  • extensions/AMetaData/amd_aip_install.class.inc.php

    r6950 r7399  
    230230      'iptc.Source',
    231231      'iptc.Special Instructions',
     232      'iptc.Subject Reference',
     233      'iptc.Subject Reference[Detail Name]',
     234      'iptc.Subject Reference[IPR]',
     235      'iptc.Subject Reference[Matter Name]',
     236      'iptc.Subject Reference[Name]',
     237      'iptc.Subject Reference[Number]',
    232238      'iptc.Sublocation',
    233239      'iptc.Supplemental Category',
  • extensions/AMetaData/amd_install.class.inc.php

    r6977 r7399  
    123123      $tablesInsert=array(
    124124"INSERT INTO `".$this->tables['groups']."` VALUES(1, 0)",
    125 "INSERT INTO `".$this->tables['groups_names']."` VALUES(1, '".$user['language']."', '".$lang['g003_default_group_name']."')",
     125$this->buildDefaultGroup(),
    126126"INSERT INTO `".$this->tables['selected_tags']."` VALUES
    127127    ('magic.Camera.Make', 0, 1),
     
    292292    }
    293293
     294    private function buildDefaultGroup()
     295    {
     296      $sql=array();
     297      $languages=get_languages();
     298      foreach($languages as $key => $val)
     299      {
     300        load_language('plugin.lang', AMD_PATH, array('language' => $key, 'no_fallback'=>true));
     301        $sql[]="(1, '".$key."', '".l10n('g003_default_group_name')."')";
     302      }
     303
     304      //reload default user language
     305      load_language('plugin.lang', AMD_PATH);
     306      return("INSERT INTO `".$this->tables['groups_names']."` VALUES ".implode(',', $sql));
     307    }
     308
    294309  } //class
    295310
  • extensions/AMetaData/amd_rb_callback.class.inc.php

    r6891 r7399  
    5252  static public function getSelect($param="")
    5353  {
    54     return("pait.value AS amdValue, paut.name AS amdName");
     54    return(" pait.value AS amdValue, paut.name AS amdName ");
    5555  }
    5656
  • extensions/AMetaData/main.inc.php

    r7036 r7399  
    126126|         |            |   new package
    127127|         |            |
     128| 0.x.y   | 2010/09/30 | * mantis bug:1894
     129|         |            |   . Error when filling the metadata repository
     130|         |            |
     131|         |            | * mantis bug:1898
     132|         |            |   . Warning "division by zero" on Canon images
     133|         |            |
     134|         |            | * mantis bug:1911
     135|         |            |   . Unable to read Jpeg file if there is extradata
     136|         |            |     after the EOI marker
     137|         |            |
     138|         |            | * mantis bug:1863
     139|         |            |   . Except "keywords" meta, all IPTC meta declared
     140|         |            |     as "repeatable" are not managed
     141|         |            |
     142|         |            | * mantis bug:1955
     143|         |            |   . Incorrect mapping for IPTC File format
     144|         |            |
     145|         |            | * mantis bug:1956
     146|         |            |   . IPTC "Subject Reference" is not implemented
     147|         |            |
     148|         |            | * mantis bug:1925
     149|         |            |   . default selected tags works only for the french
     150|         |            |     user
    128151|         |            |
    129152|         |            |
Note: See TracChangeset for help on using the changeset viewer.