Show
Ignore:
Timestamp:
05/28/08 10:32:31 (18 months ago)
Author:
fumiakiy
Message:

Calculate and set offset value correctly when the number of items appearing on a page is changed. BugId:79897

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/lib/MT/CMS/Tag.pm

    r1873 r2454  
    387387    $arg{'sort'} = 'name'; 
    388388    $arg{limit} = $limit + 1; 
    389     if ( $total && $offset > $total - 1 ) { 
     389    if ( $total <= $limit ) { 
     390        delete $arg{limit}; 
     391        $offset = 0; 
     392    } 
     393    elsif ( $total && $offset > $total - 1 ) { 
    390394        $arg{offset} = $offset = $total - $limit; 
    391395    }