aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php4
-rw-r--r--admin/comments.php1
-rw-r--r--admin/derivatives.php40
3 files changed, 32 insertions, 13 deletions
diff --git a/admin.php b/admin.php
index 4b914eae9..f15b9ab0e 100644
--- a/admin.php
+++ b/admin.php
@@ -245,10 +245,8 @@ if (
'site_manager', // delete site
'site_update', // ?only POST
'cat_list', // delete cat
- 'album', // delete cat; public/private; lock/unlock, permissions
'cat_move', // ?only POST
'cat_options', // ?only POST; public/private; lock/unlock
- 'photo',
'picture_modify', // ?only POST; associate/dissociate
'user_perm',
'group_perm',
@@ -257,6 +255,8 @@ if (
)
or ( !empty($_POST) and in_array($page['page'],
array(
+ 'photo',
+ 'album', // public/private; lock/unlock, permissions
'batch_manager', // associate/dissociate; delete; set level
'user_list', // group assoc; user level
)
diff --git a/admin/comments.php b/admin/comments.php
index e54f13421..5e8a6c4d2 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -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']))
diff --git a/admin/derivatives.php b/admin/derivatives.php
index 556ff7fec..283dceb72 100644
--- a/admin/derivatives.php
+++ b/admin/derivatives.php
@@ -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)
{