Pagination bug fixed
-
Hey Alex,
I found a problem with the pagination in manage-galleries.php.
Displaying a – b of n was not working properly,
I changed the code around line 139 from:
<?php if ( $page_links ) : ?> <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', number_format_i18n( ( $_GET['paged'] - 1 ) * $nggdb->paged['objects_per_page'] + 1 ), number_format_i18n( min( $_GET['paged'] * $nggdb->paged['objects_per_page'], $nggdb->paged['total_objects'] ) ), number_format_i18n( $nggdb->paged['total_objects'] ), $page_links ); echo $page_links_text; ?></div> <?php endif; ?>
to:
<?php if ( $page_links ) : ?> <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', number_format_i18n( ($_GET['paged'] == $rrodb->paged['max_objects_per_page']) ? $rrodb->paged['total_objects'] - $rrodb->paged['objects_per_page'] : (( $_GET['paged'] - 1 ) * $rrodb->paged['objects_per_page']) + 1 ), number_format_i18n( $_GET['paged'] == $rrodb->paged['max_objects_per_page'] ? $rrodb->paged['total_objects'] : $_GET['paged'] * $rrodb->paged['objects_per_page'] ), number_format_i18n( $rrodb->paged['total_objects'] ), $page_links ); echo $page_links_text; ?></div> <?php endif; ?>
Cheers,
Vincent
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Pagination bug fixed’ is closed to new replies.