From 0a0d1f47db696f6377f2ab72c7a157fe2c9b9037 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Tue, 13 Sep 2011 21:22:01 +0000 Subject: [PATCH] Fixed: pagination wasn't holding all parameters. Now officially super neat. git-svn-id: http://yourls.googlecode.com/svn/trunk@689 12232710-3e20-11de-b438-597f59cd7555 --- admin/index.php | 1 - includes/functions-html.php | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/index.php b/admin/index.php index 08b99a7..01af874 100644 --- a/admin/index.php +++ b/admin/index.php @@ -238,7 +238,6 @@ 'link_filter' => $link_filter, 'link_limit' => $link_limit, 'total_pages' => $total_pages, - 'base_page' => $base_page, 'search_url' => $search_url, 'date_filter' => $date_filter, 'date_first' => $date_first, diff --git a/includes/functions-html.php b/includes/functions-html.php index ae02287..3cdbad1 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -219,23 +219,27 @@ function yourls_html_tfooter( $params = array() ) { 1 ) { ?> = 2 ) { - echo '« First'; + $link = yourls_add_query_arg( array_merge( $params, array( 'page' => 1 ) ), $base_page ); + echo '« First'; echo ''; } for( $i = $p_start ; $i <= $p_end; $i++ ) { if( $i == $page ) { echo "$i"; } else { - echo ''.$i.''; + $link = yourls_add_query_arg( array_merge( $params, array( 'page' => $i ) ), $base_page ); + echo ''.$i.''; } } if( ( $p_end ) < $total_pages ) { + $link = yourls_add_query_arg( array_merge( $params, array( 'page' => $total_pages ) ), $base_page ); echo ''; - echo 'Last »'; + echo 'Last »'; } ?> -- 2.45.0