(bug 19211) Fix regression from r50351 that caused looping in previous/next navigation
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 15 Jun 2009 17:57:13 +0000 (17:57 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 15 Jun 2009 17:57:13 +0000 (17:57 +0000)
includes/CategoryPage.php

index 35a8326..83e378d 100644 (file)
@@ -464,22 +464,24 @@ class CategoryViewer {
 
                $prevLink = wfMsgExt( 'prevn', array( 'escape', 'parsemag' ), $limitText );
                if( $first != '' ) {
-                       $query['until'] = $first;
+                       $prevQuery = $query;
+                       $prevQuery['until'] = $first;
                        $prevLink = $sk->link(
                                $title,
                                $prevLink,
                                array(),
-                               $query
+                               $prevQuery
                        );
                }
                $nextLink = wfMsgExt( 'nextn', array( 'escape', 'parsemag' ), $limitText );
                if( $last != '' ) {
-                       $query['from'] = $last;
+                       $lastQuery = $query;
+                       $lastQuery['from'] = $last;
                        $nextLink = $sk->link(
                                $title,
                                $nextLink,
                                array(),
-                               $query
+                               $lastQuery
                        );
                }