Changeset 2454
- Timestamp:
- 05/28/08 10:32:31 (21 months ago)
- Location:
- branches/release-39/lib/MT/CMS
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/lib/MT/CMS/Entry.pm
r2417 r2454 559 559 $arg{direction} = 'descend'; 560 560 $arg{limit} = $limit + 1; 561 if ( $total && $offset > $total - 1 ) { 561 if ( $total <= $limit ) { 562 delete $arg{limit}; 563 $offset = 0; 564 } 565 elsif ( $total && $offset > $total - 1 ) { 562 566 $arg{offset} = $offset = $total - $limit; 563 567 } 564 568 elsif ( $offset && ( ( $offset < 0 ) || ( $total - $offset < $limit ) ) ) { 565 $arg{offset} = $offset = 0;569 $arg{offset} = $offset = $total - $limit; 566 570 } 567 571 else { -
branches/release-39/lib/MT/CMS/Tag.pm
r1873 r2454 387 387 $arg{'sort'} = 'name'; 388 388 $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 ) { 390 394 $arg{offset} = $offset = $total - $limit; 391 395 } -
branches/release-39/lib/MT/CMS/TrackBack.pm
r2169 r2454 245 245 $arg{direction} = $sort_direction; 246 246 $arg{limit} = $limit + 1; 247 if ( $total && $offset > $total - 1 ) { 247 if ( $total <= $limit ) { 248 delete $arg{limit}; 249 $offset = 0; 250 } 251 elsif ( $total && $offset > $total - 1 ) { 248 252 $arg{offset} = $offset = $total - $limit; 249 253 } 250 254 elsif ( $offset && ( ( $offset < 0 ) || ( $total - $offset < $limit ) ) ) { 251 $arg{offset} = $offset = 0;252 } 253 els if ($offset){254 $arg{offset} = $offset ;255 $arg{offset} = $offset = $total - $limit; 256 } 257 else { 258 $arg{offset} = $offset if $offset; 255 259 } 256 260
