picture_modify: do not show link to gallery if user level is too low

This commit is contained in:
plegall
2021-01-06 10:14:45 +01:00
parent 4d102e9eba
commit baa2a2190d
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -183,6 +183,9 @@ UPDATE '.CATEGORIES_TABLE.'
$page['infos'][] = l10n('Photo informations updated');
pwg_activity('photo', $_GET['image_id'], 'edit');
// refresh page cache
$page['image'] = get_image_infos($_GET['image_id'], true);
}
// tags
@@ -379,6 +382,7 @@ while ($row = pwg_db_fetch_assoc($result))
// 3. if URL category not available or reachable, use the first reachable
// linked category
// 4. if no category reachable, no jumpto link
// 5. if level is too high for current user, no jumpto link
$query = '
SELECT category_id
@@ -420,7 +424,7 @@ else
}
}
if (isset($url_img))
if (isset($url_img) and $user['level'] >= $page['image']['level'])
{
$template->assign( 'U_JUMPTO', $url_img );
}