diff --git a/Source/pages/list.php b/Source/pages/list.php index 6d12603..78fdf88 100644 --- a/Source/pages/list.php +++ b/Source/pages/list.php @@ -58,6 +58,7 @@ if ( $t_count > $f_perpage ) { $t_pages = ceil( $t_count / $f_perpage ); + $t_block = max( 5, min( 20, ceil( $t_pages / 6 ) ) ); $t_current = $f_offset; $t_page_set = array(); @@ -71,7 +72,7 @@ for( $i = 1; $i <= $t_pages; $i++ ) { if ( $i <= 3 || $i > $t_pages-3 || ( $i >= $t_current-4 && $i <= $t_current+4 ) || - $i % 10 == 0) { + $i % $t_block == 0) { $t_page_set[] = $i; $t_used_page = true; diff --git a/Source/pages/search.php b/Source/pages/search.php index 3a4a8d7..7fa6628 100644 --- a/Source/pages/search.php +++ b/Source/pages/search.php @@ -54,6 +54,7 @@ if ( $t_count > $f_perpage ) { $t_pages = ceil( $t_count / $f_perpage ); + $t_block = max( 5, min( 20, ceil( $t_pages / 6 ) ) ); $t_current = $f_offset; $t_page_set = array(); @@ -67,7 +68,7 @@ for( $i = 1; $i <= $t_pages; $i++ ) { if ( $i <= 3 || $i > $t_pages-3 || ( $i >= $t_current-4 && $i <= $t_current+4 ) || - $i % 10 == 0) { + $i % $t_block == 0) { $t_page_set[] = $i; $t_used_page = true;