$showme = $par;
} elseif( $prefix != '' ) {
$showme = $prefix;
- } elseif( $from != '' ) {
+ } elseif( $from != '' && $ns === null ) {
// For back-compat with Special:Allpages
+ // Don't do this if namespace is passed, so paging works when doing NS views.
$showme = $from;
}
'prefix' => $prefix
);
- if( $namespace ) {
+ if( $namespace || ($prefix == '')) {
+ // Keep the namespace even if it's 0 for empty prefixes.
+ // This tells us we're not just a holdover from old links.
$query['namespace'] = $namespace;
}
-
$nextLink = Linker::linkKnown(
$self,
wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ),