Changeset 15343 for extensions/AMetaData/amd_pip.class.inc.php
- Timestamp:
- May 27, 2012, 1:31:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/amd_pip.class.inc.php
r12226 r15343 67 67 $this->pictureProperties['id']=$page['image_id']; 68 68 69 $sql="SELECT ti.path, tai.analyzed , ti.has_highFROM ".IMAGES_TABLE." ti69 $sql="SELECT ti.path, tai.analyzed FROM ".IMAGES_TABLE." ti 70 70 LEFT JOIN ".$this->tables['images']." tai ON tai.imageId = ti.id 71 71 WHERE ti.id=".$page['image_id'].";"; … … 73 73 if($result) 74 74 { 75 $hasHigh='';76 75 while($row=pwg_db_fetch_assoc($result)) 77 76 { 78 77 $filename=$row['path']; 79 $hasHigh=$row['has_high'];80 78 $this->pictureProperties['analyzed']=$row['analyzed']; 81 79 } 82 80 $filename=$path."/".$filename; 83 84 if($hasHigh==='true' and $this->config['amd_UseMetaFromHD']=='y')85 {86 $filename=dirname($filename)."/pwg_high/".basename($filename);87 }88 81 } 89 82 … … 220 213 { 221 214 $group=$tagProperties['gName']; 222 if(!is_null($md)) 223 { 224 $metadata[]=$md; 225 unset($md); 226 } 227 $md=Array( 228 'TITLE' => $tagProperties['gName'], 229 'lines' => Array() 230 ); 215 if(!isset($metadata[$group])) 216 { 217 $metadata[$group]=Array( 218 'TITLE' => $tagProperties['gName'], 219 'lines' => Array() 220 ); 221 } 231 222 } 232 223 … … 249 240 if($value!="") 250 241 { 251 $m d['lines'][L10n::get($picturesTags[$key]->getName())]=AMD_root::prepareValueForDisplay($value, $picturesTags[$key]->isTranslatable());242 $metadata[$group]['lines'][L10n::get($picturesTags[$key]->getName())]=AMD_root::prepareValueForDisplay($value, $picturesTags[$key]->isTranslatable()); 252 243 } 253 244 } 254 245 elseif($userDefined and isset($userDefinedValues[$tagProperties['numId']]) and $userDefinedValues[$tagProperties['numId']]!='') 255 246 { 256 $md['lines'][$tagProperties['name']]=$userDefinedValues[$tagProperties['numId']]; 257 } 258 } 259 260 if(!is_null($md) and count($md['lines'])>0) 261 { 262 $metadata[]=$md; 247 $metadata[$group]['lines'][$tagProperties['name']]=$userDefinedValues[$tagProperties['numId']]; 248 } 263 249 } 264 250
Note: See TracChangeset
for help on using the changeset viewer.