Changeset 13240 for trunk/admin


Ignore:
Timestamp:
Feb 18, 2012, 9:46:46 PM (12 years ago)
Author:
rvelices
Message:
  • multisize thumb longest side can be smaller than the square size
  • remove unused css, shorten/optimize php called very often (at least theoretically should be faster)
Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/comments.php

    r13079 r13240  
    127127        'id'=>$row['image_id'],
    128128        'path'=>$row['path'],
    129         'tn_ext'=>@$row['tn_ext']
    130129        )
    131130     );
  • trunk/admin/derivatives.php

    r13035 r13240  
    5353      continue;
    5454
    55     $v = intval($pderivative['w']);
    56     if ($v<=0 || $v<=$prev_w)
    57     {
    58       $errors[$type]['w'] = '>'.$prev_w;
    59     }
    60     $v = intval($pderivative['h']);
    61     if ($v<=0 || $v<=$prev_h)
    62     {
    63       $errors[$type]['h'] = '>'.$prev_h;
    64     }
     55                if ($type==IMG_THUMB)
     56                {
     57                        $w = intval($pderivative['w']);
     58                        if ($w<=0)
     59                        {
     60                                $errors[$type]['w'] = '>0';
     61                        }
     62                        $h = intval($pderivative['h']);
     63                        if ($h<=0)
     64                        {
     65                                $errors[$type]['h'] = '>0';
     66                        }
     67                        if (max($w,$h) <= $prev_w)
     68                        {
     69                                $errors[$type]['w'] = $errors[$type]['h'] = '>'.$prev_w;
     70                        }
     71                }
     72                else
     73                {
     74                        $v = intval($pderivative['w']);
     75                        if ($v<=0 || $v<=$prev_w)
     76                        {
     77                                $errors[$type]['w'] = '>'.$prev_w;
     78                        }
     79                        $v = intval($pderivative['h']);
     80                        if ($v<=0 || $v<=$prev_h)
     81                        {
     82                                $errors[$type]['h'] = '>'.$prev_h;
     83                        }
     84                }
    6585    $v = intval($pderivative['crop']);
    6686    if ($v<0 || $v>100)
Note: See TracChangeset for help on using the changeset viewer.