Index: /sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php
===================================================================
--- /sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php (revision 6385)
+++ /sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php (revision 6386)
@@ -103,4 +103,10 @@
$query_args['paged'] = $paged;
}
+ if ( isset( $_GET['rper_page'] ) ) {
+ $per_page = (int) $_GET['rper_page'];
+ if ( $per_page > 1 && $per_page <= 40 ) {
+ $query_args['posts_per_page'] = $per_page;
+ }
+ }
$rev_query = new WP_Query( $query_args );
if ( empty( $rev_query->posts ) ) {
@@ -239,6 +245,10 @@
private static function pagination( $query ) {
global $wp;
- $bignum = 999999999;
- $base_link = add_query_arg( 'rpage', '%#%', home_url( trailingslashit( $wp->request ) ) );
+ $bignum = 999999999;
+ $base_link = home_url( trailingslashit( $wp->request ) );
+ if ( isset( $_GET['rper_page'] ) ) {
+ $base_link = add_query_arg( 'rper_page', (int) $_GET['rper_page'], $base_link );
+ }
+ $base_link = add_query_arg( 'rpage', '%#%', $base_link );
$max_num_pages = $query->max_num_pages;
$current_page = max( 1, $query->get( 'paged' ) );