Changeset 376


Ignore:
Timestamp:
Feb 27, 2004, 6:36:55 PM (20 years ago)
Author:
z0rglub
Message:

moving the $pagestart calculation when $_GETnum is provided. The
calculation is now placed BEFORE initialize_category function call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/category.php

    r350 r376  
    4747else
    4848  $page['start'] = $_GET['start'];
     49// Sometimes, a "num" is provided in the URL. It is the number
     50// of the picture to show. This picture must be in the thumbnails page.
     51// We have to find the right $page['start'] that show the num picture
     52// in this category
     53if ( isset( $_GET['num'] )
     54     and is_numeric( $_GET['num'] )
     55     and $_GET['num'] >= 0 )
     56{
     57  $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
     58  $page['start']*= $user['nb_image_page'];
     59}
    4960
    5061initialize_category();
     
    8091  $page['tab_expand'] = array();
    8192  $page['expand'] = 'all';
    82 }
    83 // Sometimes, a "num" is provided in the URL. It is the number
    84 // of the picture to show. This picture must be in the thumbnails page.
    85 // We have to find the right $page['start'] that show the num picture
    86 // in this category
    87 if ( isset( $_GET['num'] )
    88      and is_numeric( $_GET['num'] )
    89      and $_GET['num'] >= 0 )
    90 {
    91   $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
    92   $page['start']*= $user['nb_image_page'];
    9393}
    9494// creating the structure of the categories (useful for displaying the menu)
Note: See TracChangeset for help on using the changeset viewer.