Index: trunk/extensions/GlobalUsage/SpecialGlobalUsage.php |
— | — | @@ -41,11 +41,14 @@ |
42 | 42 | * Shows the search form |
43 | 43 | */ |
44 | 44 | private function showForm() { |
45 | | - global $wgScript, $wgOut; |
| 45 | + global $wgScript, $wgOut, $wgRequest; |
46 | 46 | |
| 47 | + /* Build form */ |
47 | 48 | $html = Xml::openElement( 'form', array( 'action' => $wgScript ) ) . "\n"; |
48 | 49 | // Name of SpecialPage |
49 | 50 | $html .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
| 51 | + // Limit |
| 52 | + $html .= Xml::hidden( 'limit', $wgRequest->getInt( 'limit', 50 ) ); |
50 | 53 | // Input box with target prefilled if available |
51 | 54 | $formContent = "\t" . Xml::input( 'target', 40, is_null( $this->target ) ? '' |
52 | 55 | : $this->target->getText() ) |
— | — | @@ -136,8 +139,10 @@ |
137 | 140 | else |
138 | 141 | $page = "{$item['namespace']}:{$item['title']}"; |
139 | 142 | |
140 | | - return WikiMap::makeForeignLink( $item['wiki'], $page, |
| 143 | + $link = WikiMap::makeForeignLink( $item['wiki'], $page, |
141 | 144 | str_replace( '_', ' ', $page ) ); |
| 145 | + // Return only the title if no link can be constructed |
| 146 | + return $link === false ? $page : $link; |
142 | 147 | } |
143 | 148 | |
144 | 149 | |
— | — | @@ -269,6 +274,8 @@ |
270 | 275 | if ( $to ) { |
271 | 276 | $attr = array( 'title' => $pTitle, 'class' => 'mw-prevlink' ); |
272 | 277 | $q = array( 'limit' => $limit, 'to' => $to, 'target' => $target ); |
| 278 | + if ( $this->filterLocal ) |
| 279 | + $q['filterlocal'] = '1'; |
273 | 280 | $plink = $skin->link( $title, $prev, $attr, $q ); |
274 | 281 | } else { |
275 | 282 | $plink = $prev; |
— | — | @@ -278,6 +285,8 @@ |
279 | 286 | if ( $from ) { |
280 | 287 | $attr = array( 'title' => $nTitle, 'class' => 'mw-nextlink' ); |
281 | 288 | $q = array( 'limit' => $limit, 'from' => $from, 'target' => $target ); |
| 289 | + if ( $this->filterLocal ) |
| 290 | + $q['filterlocal'] = '1'; |
282 | 291 | $nlink = $skin->link( $title, $next, $attr, $q ); |
283 | 292 | } else { |
284 | 293 | $nlink = $next; |
— | — | @@ -289,6 +298,8 @@ |
290 | 299 | $fmtLimit = $wgLang->formatNum( $num ); |
291 | 300 | |
292 | 301 | $q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target ); |
| 302 | + if ( $this->filterLocal ) |
| 303 | + $q['filterlocal'] = '1'; |
293 | 304 | $lTitle = wfMsgExt( 'shown-title', array( 'parsemag', 'escape' ), $num ); |
294 | 305 | $attr = array( 'title' => $lTitle, 'class' => 'mw-numlink' ); |
295 | 306 | |