(bug 34736) empty limit on special pages causes navigation issues
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 27 Feb 2012 10:17:01 +0000 (10:17 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 27 Feb 2012 10:17:01 +0000 (10:17 +0000)
On special pages, the older link showed a limit='' query parameter which
made the page show nothing ('' is evalued to a limit of 0 articles).

The cause is r105809 which changed the way we interprets parameters in
wfArrayToCGI() and wfCGIToArray(). Previously, An empty string value would skip
the key, after r105809, we need to use null.

includes/Pager.php

index cd0d9eb..e2c7751 100644 (file)
@@ -472,7 +472,7 @@ abstract class IndexPager extends ContextSource implements Pager {
                }
 
                # Don't announce the limit everywhere if it's the default
-               $urlLimit = $this->mLimit == $this->mDefaultLimit ? '' : $this->mLimit;
+               $urlLimit = $this->mLimit == $this->mDefaultLimit ? null : $this->mLimit;
 
                if ( $this->mIsFirst ) {
                        $prev = false;