diff options
Diffstat (limited to 'picture.php')
-rw-r--r-- | picture.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/picture.php b/picture.php index 0e64d2946..abb3d714b 100644 --- a/picture.php +++ b/picture.php @@ -38,9 +38,11 @@ if (isset($page['category'])) check_restrictions($page['category']['id']); } +$page['rank_of'] = array_flip($page['items']); + // if this image_id doesn't correspond to this category, an error message is // displayed, and execution is stopped -if (!in_array($page['image_id'], $page['items'])) +if ( !isset($page['rank_of'][$page['image_id']]) ) { page_not_found( 'The requested image does not belong to this image set', @@ -103,8 +105,6 @@ function default_picture_content($content, $element_info) // | initialization | // +-----------------------------------------------------------------------+ -$page['rank_of'] = array_flip($page['items']); - // caching first_rank, last_rank, current_rank in the displayed // section. This should also help in readability. $page['first_rank'] = 0; |