From: Niklas Laxström Date: Mon, 27 Apr 2009 10:21:38 +0000 (+0000) Subject: * (bug 17614) Prev / Next links not need on ImagePage file history if less than limit X-Git-Tag: 1.31.0-rc.0~41982 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=f7cfa98323010688c58dc5332c02ed50d21fb7a5;p=lhc%2Fweb%2Fwiklou.git * (bug 17614) Prev / Next links not need on ImagePage file history if less than limit --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3ae32f32ad..00223f65a6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -375,6 +375,7 @@ The following extensions are migrated into MediaWiki 1.15: * (bug 17020) Adding fallback encodings for Traditional and Simplified Chinese languages while the the text is typed as URLs. * (bug 18535) Search tab tool-tops are corrupted +* (bug 17614) Prev / Next links not need on ImagePage file history if less than limit == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d3e01f29eb..354b6ef554 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -958,7 +958,12 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager { if( count($this->mHist) ) { $list = new ImageHistoryList( $this->mImagePage ); # Generate prev/next links - $navLink = $this->getNavigationBar(); + $navLink = ''; + + # Only add navigation links when needed + if ( !$this->mIsFirst && !$this->mIsLast ) { + $navLink = $this->getNavigationBar(); + } $s = $list->beginImageHistoryList($navLink); // Skip rows there just for paging links for( $i = $this->mRange[0]; $i <= $this->mRange[1]; $i++ ) {