mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- 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) git-svn-id: http://piwigo.org/svn/trunk@13240 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -126,7 +126,6 @@ while ($row = pwg_db_fetch_assoc($result))
|
||||
array(
|
||||
'id'=>$row['image_id'],
|
||||
'path'=>$row['path'],
|
||||
'tn_ext'=>@$row['tn_ext']
|
||||
)
|
||||
);
|
||||
if (empty($row['author_id']))
|
||||
|
||||
+30
-10
@@ -52,16 +52,36 @@ if ( isset($_POST['d']) )
|
||||
if (!$pderivative['enabled'])
|
||||
continue;
|
||||
|
||||
$v = intval($pderivative['w']);
|
||||
if ($v<=0 || $v<=$prev_w)
|
||||
{
|
||||
$errors[$type]['w'] = '>'.$prev_w;
|
||||
}
|
||||
$v = intval($pderivative['h']);
|
||||
if ($v<=0 || $v<=$prev_h)
|
||||
{
|
||||
$errors[$type]['h'] = '>'.$prev_h;
|
||||
}
|
||||
if ($type==IMG_THUMB)
|
||||
{
|
||||
$w = intval($pderivative['w']);
|
||||
if ($w<=0)
|
||||
{
|
||||
$errors[$type]['w'] = '>0';
|
||||
}
|
||||
$h = intval($pderivative['h']);
|
||||
if ($h<=0)
|
||||
{
|
||||
$errors[$type]['h'] = '>0';
|
||||
}
|
||||
if (max($w,$h) <= $prev_w)
|
||||
{
|
||||
$errors[$type]['w'] = $errors[$type]['h'] = '>'.$prev_w;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$v = intval($pderivative['w']);
|
||||
if ($v<=0 || $v<=$prev_w)
|
||||
{
|
||||
$errors[$type]['w'] = '>'.$prev_w;
|
||||
}
|
||||
$v = intval($pderivative['h']);
|
||||
if ($v<=0 || $v<=$prev_h)
|
||||
{
|
||||
$errors[$type]['h'] = '>'.$prev_h;
|
||||
}
|
||||
}
|
||||
$v = intval($pderivative['crop']);
|
||||
if ($v<0 || $v>100)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user