* (bug 17614) Prev / Next links not need on ImagePage file history if less than limit
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 27 Apr 2009 10:21:38 +0000 (10:21 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 27 Apr 2009 10:21:38 +0000 (10:21 +0000)
RELEASE-NOTES
includes/ImagePage.php

index 3ae32f3..00223f6 100644 (file)
@@ -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
index d3e01f2..354b6ef 100644 (file)
@@ -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++ ) {