Ignore:
Timestamp:
Oct 31, 2010, 7:08:03 PM (13 years ago)
Author:
grum
Message:

Exploit the JpegMetadata class previous evolution
feature:1975, feature:1976, feature:1978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/amd_aip.class.inc.php

    r7447 r7519  
    558558    $template->set_filename('sheet_page', dirname(__FILE__).'/admin/amd_metadata_database_status.tpl');
    559559
     560    $warning2='';
     561    $sql="SELECT tagId
     562          FROM ".$this->tables['used_tags']."
     563          WHERE newFromLastUpdate='y'";
     564    $result=pwg_query($sql);
     565    if($result)
     566    {
     567      $tmp=array();
     568      $tagSchema='';
     569      while($row=pwg_db_fetch_assoc($result))
     570      {
     571        if(preg_match('/^([a-z0-9]*)\..*/i', $row['tagId'], $tagSchema))
     572        {
     573          if(!in_array($tagSchema[1],$this->config['amd_FillDataBaseIgnoreSchemas'])) $tmp[]=$row['tagId'];
     574        }
     575      }
     576      if(count($tmp)>0)
     577      {
     578        $ul='';
     579        foreach($tmp as $val)
     580        {
     581          $ul.='<li>'.$val.'</li>';
     582        }
     583        if(count($tmp)>1)
     584        {
     585          $warning2=sprintf(GPCCore::BBtoHTML(l10n('g003_databaseWarning2_n')),$ul);
     586        }
     587        else
     588        {
     589          $warning2=sprintf(GPCCore::BBtoHTML(l10n('g003_databaseWarning2_1')),$ul);
     590        }
     591      }
     592    }
     593
     594
    560595    $datas=array(
    561596      'urlRequest' => $this->getAdminLink('ajax'),
     597      'warning2' => $warning2,
    562598      'warning1' => GPCCore::BBtoHTML(l10n('g003_databaseWarning1')),
    563599      'nfoMetadata' => Array(
     
    566602          'magic' => 0,
    567603          'xmp' => 0,
     604          'com' => 0,
    568605          'userDefined' => 0,
    569606          'numOfPictures' => 0,
     
    591628          FROM ".$this->tables['used_tags']."
    592629          WHERE tagId LIKE 'xmp.%'
     630          UNION
     631          SELECT SUM(numOfImg), 'com'
     632          FROM ".$this->tables['used_tags']."
     633          WHERE tagId LIKE 'com.%'
    593634          UNION
    594635          SELECT SUM(numOfImg), 'userDefined'
     
    619660             $row['type']=='magic' or
    620661             $row['type']=='xmp' or
     662             $row['type']=='com' or
    621663             $row['type']=='userDefined') $datas['nfoMetadata']['nfoRows']+=$row['nb'];
    622664        }
Note: See TracChangeset for help on using the changeset viewer.