Changeset 27620


Ignore:
Timestamp:
Mar 8, 2014, 7:32:46 PM (7 years ago)
Author:
Miklfe
Message:

bug important résolut

Location:
extensions/batch_manager_prefilters_ratio
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/batch_manager_prefilters_ratio/main.inc.php

    r27605 r27620  
    9898}
    9999
     100function filter_sets_image_format($ratios)
     101{
     102  $res = array();
     103 
     104   $query = '
     105   SELECT id, width, height
     106   FROM '.IMAGES_TABLE.'
     107   ;';
     108       
     109   $result = pwg_query($query);
     110   if (pwg_db_num_rows($result))
     111   {
     112    while ($row = pwg_db_fetch_assoc($result))
     113    {
     114    if ($row['width']>0 && $row['height']>0)
     115     {
     116     $ratio = floor($row['width'] / $row['height'] * 100) / 100;
     117               
     118    if(($ratio > $ratios[0] && $ratio < $ratios[1]) || ($ratio > $ratios[2] && $ratio < $ratios[3]))
     119     {
     120      $res[] = $row['id'];
     121     }
     122        }
     123   }
     124 }
     125        return $res;
     126}
     127
    100128?>
Note: See TracChangeset for help on using the changeset viewer.