Page MenuHomePhabricator

whatlinkshere.patch

Authored By
bzimport
Nov 21 2014, 9:41 PM
Size
1 KB
Referenced Files
None
Subscribers
None

whatlinkshere.patch

Index: SpecialWhatlinkshere.php
===================================================================
--- SpecialWhatlinkshere.php (revision 21383)
+++ SpecialWhatlinkshere.php (working copy)
@@ -254,18 +254,19 @@
} else {
$nextLink = $next;
}
- $nums = $this->numLink( 20, $prevId ) . ' | ' .
- $this->numLink( 50, $prevId ) . ' | ' .
- $this->numLink( 100, $prevId ) . ' | ' .
- $this->numLink( 250, $prevId ) . ' | ' .
- $this->numLink( 500, $prevId );
+ $nums = $this->numLink( 20, $prevId, $namespace ) . ' | ' .
+ $this->numLink( 50, $prevId, $namespace ) . ' | ' .
+ $this->numLink( 100, $prevId, $namespace ) . ' | ' .
+ $this->numLink( 250, $prevId, $namespace ) . ' | ' .
+ $this->numLink( 500, $prevId, $namespace );
return wfMsg( 'viewprevnext', $prevLink, $nextLink, $nums );
}
- function numLink( $limit, $from ) {
+ function numLink( $limit, $from, $ns = null ) {
global $wgLang;
$query = "limit={$limit}&from={$from}";
+ if ( isset($ns) ) $query .= "&namespace={$ns}";
$fmtLimit = $wgLang->formatNum( $limit );
return $this->makeSelfLink( $fmtLimit, $query );
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3484
Default Alt Text
whatlinkshere.patch (1 KB)

Event Timeline