diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-09-04 08:07:33 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-09-04 08:07:33 +0000 |
commit | dd38c1463991eb623e2d810525bd4d341cba1ef1 (patch) | |
tree | 7ba6a7be19ae195357a9f5acfd5fd1404badf956 /category.php | |
parent | af5bb2dde0857fea96266e4fc8a3fae705b50260 (diff) |
- bug correction : when coming from picture.php on a picture of category.php
page superior to the first, the right page was displayed (the one
including the element) but the navigation bar was always saying we were on
the first page
- distinguish CSS classes span.dateSelected and span.pageNumberSelected
git-svn-id: http://piwigo.org/svn/trunk@514 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | category.php | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/category.php b/category.php index 4e763359c..a292a7c84 100644 --- a/category.php +++ b/category.php @@ -50,9 +50,25 @@ if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) ) if ( !isset( $_GET['start'] ) or !is_numeric( $_GET['start'] ) or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) ) +{ $page['start'] = 0; +} else +{ $page['start'] = $_GET['start']; +} + +// Sometimes, a "num" is provided in the URL. It is the number +// of the picture to show. This picture must be in the thumbnails page. +// We have to find the right $page['start'] that show the num picture +// in this category +if ( isset( $_GET['num'] ) + and is_numeric( $_GET['num'] ) + and $_GET['num'] >= 0 ) +{ + $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] ); + $page['start']*= $user['nb_image_page']; +} initialize_category(); @@ -75,17 +91,6 @@ if ( $user['expand'] ) $page['tab_expand'] = array(); } -// Sometimes, a "num" is provided in the URL. It is the number -// of the picture to show. This picture must be in the thumbnails page. -// We have to find the right $page['start'] that show the num picture -// in this category -if ( isset( $_GET['num'] ) - and is_numeric( $_GET['num'] ) - and $_GET['num'] >= 0 ) -{ - $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] ); - $page['start']*= $user['nb_image_page']; -} // creating the structure of the categories (useful for displaying the menu) // creating the plain structure : array of all the available categories and // their relative informations, see the definition of the function |