Show
Ignore:
Timestamp:
03/09/07 17:28:49 (6 years ago)
Author:
plg
Message:

New: #images.high_filesize was added so that we can sum the filesizes in the
filtered history. #images.high_filesize is filled during metadata
synchronization.

Bug fixed: in getAttribute XML function, when asking "filesize", it was
returning high_filesize. The regex was too simple.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_update.php

    r1458 r1883  
    776776  $datas = array(); 
    777777  $tags_of = array(); 
     778 
     779  $has_high_images = array(); 
     780 
     781  $image_ids = array(); 
     782  foreach ($files as $id => $file) 
     783  { 
     784    array_push($image_ids, $id); 
     785  } 
     786 
     787  if (count($image_ids) > 0) 
     788  { 
     789    $query = ' 
     790SELECT id 
     791  FROM '.IMAGES_TABLE.' 
     792  WHERE has_high = \'true\' 
     793    AND id IN ( 
     794'.wordwrap(implode(', ', $image_ids), 80, "\n").' 
     795) 
     796;'; 
     797 
     798    $result = pwg_query($query); 
     799    while ($row = mysql_fetch_array($result)) 
     800    { 
     801      array_push($has_high_images, $row['id']); 
     802    } 
     803  } 
     804   
    778805  foreach ( $files as $id=>$file ) 
    779806  { 
    780     $data = $site_reader->get_element_metadata($file); 
     807    $data = $site_reader->get_element_metadata( 
     808      $file, 
     809      in_array($id, $has_high_images) 
     810      ); 
     811     
    781812    if ( is_array($data) ) 
    782813    { 
     
    814845    if (count($datas) > 0) 
    815846    { 
     847      // echo '<pre>', print_r($datas); echo '</pre>'; 
     848       
    816849      mass_updates( 
    817850        IMAGES_TABLE,