Fix navigation buttons on Special:Listfiles for first and last page
authorRohan <rohan1395@yahoo.com>
Wed, 9 Jul 2014 11:40:35 +0000 (17:10 +0530)
committerBrian Wolff <bawolff+wn@gmail.com>
Thu, 17 Jul 2014 00:14:13 +0000 (00:14 +0000)
The listfiles pager was appending the username to the paging queries
for all paging queries. On the first/last page, this was appending
the username to false, thus marking the first/last page as still having
further results despite that not being the case.

Bug: 67627
Change-Id: Ib302a826fa638d7ae25c6d37951277fa8701ab69

includes/specials/SpecialListfiles.php

index 3715b8b..8e17015 100644 (file)
@@ -547,7 +547,9 @@ class ImageListPager extends TablePager {
                if ( !is_null( $this->mUserName ) ) {
                        # Append the username to the query string
                        foreach ( $queries as &$query ) {
                if ( !is_null( $this->mUserName ) ) {
                        # Append the username to the query string
                        foreach ( $queries as &$query ) {
-                               $query['user'] = $this->mUserName;
+                               if ( $query !== false ) {
+                                       $query['user'] = $this->mUserName;
+                               }
                        }
                }
 
                        }
                }