Changeset 5183 for extensions/AMetaData/amd_pip.class.inc.php
- Timestamp:
- Mar 18, 2010, 11:47:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/amd_pip.class.inc.php
r4909 r5183 64 64 $path=dirname(dirname(dirname(__FILE__))); 65 65 $filename=""; 66 $analyzed='n'; 66 67 67 $sql="SELECT path FROM ".IMAGES_TABLE." WHERE id=".$page['image_id'].";"; 68 $sql="SELECT ti.path, tai.analyzed FROM ".IMAGES_TABLE." ti 69 LEFT JOIN ".$this->tables['images']." tai ON tai.imageId = ti.id 70 WHERE ti.id=".$page['image_id'].";"; 68 71 $result=pwg_query($sql); 69 72 if($result) … … 72 75 { 73 76 $filename=$row['path']; 77 $analyzed=$row['analyzed']; 74 78 } 75 79 $filename=$path."/".$filename; 76 80 } 77 81 78 $ JpegMD = new JpegMetaData(82 $this->jpegMD->load( 79 83 $filename, 80 84 Array( … … 113 117 $group=null; 114 118 115 $picturesTags=$ JpegMD->getTags();119 $picturesTags=$this->jpegMD->getTags(); 116 120 117 121 foreach($tagsList as $key => $val) … … 160 164 } 161 165 162 unset($JpegMD); 166 167 if($analyzed=='n' and 168 $this->my_config['amd_FillDataBaseContinuously']=='y' and 169 $this->my_config['amd_AllPicturesAreAnalyzed']=='n') 170 { 171 /* if picture is not analyzed, do analyze 172 * 173 * note : the $loaded parameter is set to true, in this case the function 174 * analyzeImageFile uses data from the $this->jpegMD object which 175 * have data already loaded => the picture is not analyzed twice, 176 * the function only do the database update 177 */ 178 $this->analyzeImageFile($filename, $page['image_id'], true); 179 $this->makeStatsConsolidation(); 180 } 163 181 164 182 $template->assign('metadata', $metadata);
Note: See TracChangeset
for help on using the changeset viewer.