From 32a6e0dafc2c4b752a3f5f1d945759c2aa7460d2 Mon Sep 17 00:00:00 2001 From: int2str Date: Thu, 27 Mar 2003 00:07:31 +0000 Subject: [PATCH] * core/print_api.php: print_page_links() - Fix for #3075: Do not display page links if only 1 page exists for current view settings on view_all_bug_page. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2128 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- core/print_api.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/print_api.php b/core/print_api.php index 5ab576d72d..efc7942469 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: print_api.php,v 1.65 2003-03-21 05:55:52 vboctor Exp $ + # $Id: print_api.php,v 1.66 2003-03-27 00:07:31 int2str Exp $ # -------------------------------------------------------- $t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR; @@ -335,8 +335,6 @@ function print_assign_to_option_list( $p_user_id='', $p_project_id = null ) { } foreach ( $t_users as $t_user ) { - $v_id = $val[1]; - $v_username = $val[0]; echo ''; @@ -911,6 +909,13 @@ function print_page_links( $p_page, $p_start, $p_end, $p_current ) { $t_items = array(); $t_link = ""; + # Check if we have more than one page, + # otherwise return without doing anything. + + if ( $p_end - $p_start < 1 ) { + return; + } + # Get localized strings $t_first = lang_get( 'first' ); $t_last = lang_get( 'last' );