aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-02-27 17:36:55 +0000
committerz0rglub <z0rglub@piwigo.org>2004-02-27 17:36:55 +0000
commitb037ef4bab12ddb3a884beb312180a9fd811e01c (patch)
tree6e02b33542f09e9986db1c03e2575650e058eca7
parent1ea69211edc8575bacffdd652dfb869e872fdebd (diff)
moving the $page['start'] calculation when $_GET['num'] is provided. The
calculation is now placed BEFORE initialize_category function call git-svn-id: http://piwigo.org/svn/branches/release-1_3@376 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--category.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/category.php b/category.php
index 813a2771f..e6c0b386a 100644
--- a/category.php
+++ b/category.php
@@ -46,6 +46,17 @@ if ( !isset( $_GET['start'] )
$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();
@@ -80,17 +91,6 @@ if ( $user['expand']
$page['tab_expand'] = array();
$page['expand'] = 'all';
}
-// 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