<?php
/**
*
+ * @package MediaWiki
+ * @subpackage SpecialPage
*/
/**
*
*/
function wfSpecialAllpages( $par=NULL ) {
- global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgLang;
+ global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgContLang;
$indexMaxperpage = 480;
$toplevelMaxperpage = 50;
$from = $wgRequest->getVal( 'from' );
$namespace = $wgRequest->getInt( 'namespace' );
- $names = $wgLang->getNamespaces();
+ $names = $wgContLang->getNamespaces();
if( !isset( $names[$namespace] ) ) {
$namespace = 0;
}
}
function namespaceForm ( $namespace = 0, $from = '' ) {
- global $wgLang, $wgScript;
+ global $wgContLang, $wgScript;
$t = Title::makeTitle( NS_SPECIAL, "Allpages" );
$namespaceselect = '<select name="namespace">';
- $arr = $wgLang->getNamespaces();
+ $arr = $wgContLang->getNamespaces();
for ( $i = 0; $i < 14; $i++ ) {
$namespacename = str_replace ( "_", " ", $arr[$i] );
$n = ($i == 0) ? wfMsg ( 'articlenamespace' ) : $namespacename;
$out = "<div class='namespaceselector'><form method='get' action='{$wgScript}'>";
$out .= '<input type="hidden" name="title" value="'.$t->getPrefixedText().'" />';
- $out .= wfMsg ( 'allpagesformtext', $frombox, $namespaceselect, $submitbutton );
+ $out .= wfMsg ( 'allpagesformtext1', $frombox ) . '<br />';
+ $out .= wfMsg ( 'allpagesformtext2', $namespaceselect, $submitbutton );
$out .= '</form></div>';
return $out;
}
function indexShowToplevel ( $namespace = 0 ) {
- global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgLang, $wgRequest, $wgUser;
+ global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser;
$sk = $wgUser->getSkin();
$fname = "indexShowToplevel";
$namespace = intval ($namespace);
$morelinks = "";
if ( $offset > 0 ) {
$morelinks = $sk->makeKnownLink (
- $wgLang->specialPage ( "Allpages" ),
+ $wgContLang->specialPage ( "Allpages" ),
wfMsg ( 'allpagesprev' ),
( $offset > $toplevelMaxperpage ) ? 'offset='.($offset-$toplevelMaxperpage) : ''
);
if ( $stopat < $sections-1 ) {
if ( $morelinks != "" ) { $morelinks .= " | "; }
$morelinks .= $sk->makeKnownLink (
- $wgLang->specialPage ( "Allpages" ),
+ $wgContLang->specialPage ( "Allpages" ),
wfMsg ( 'allpagesnext' ),
'offset=' . ($offset + $toplevelMaxperpage)
);
}
function indexShowChunk( $from, $namespace = 0 ) {
- global $wgOut, $wgUser, $indexMaxperpage, $wgLang;
+ global $wgOut, $wgUser, $indexMaxperpage, $wgContLang;
$sk = $wgUser->getSkin();
$maxPlusOne = $indexMaxperpage + 1;
$namespacee = intval($namespace);
$out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
$out2 .= '<tr valign="top"><td align="left">' . $nsForm;
$out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
- $sk->makeKnownLink( $wgLang->specialPage( "Allpages" ),
+ $sk->makeKnownLink( $wgContLang->specialPage( "Allpages" ),
wfMsg ( 'allpages' ) );
if ( ($n == $indexMaxperpage) && ($s = $dbr->fetchObject( $res )) ) {
+ $namespaceparam = $namespace ? "&namespace=$namespace" : "";
$out2 .= " | " . $sk->makeKnownLink(
- $wgLang->specialPage( "Allpages" ),
+ $wgContLang->specialPage( "Allpages" ),
wfMsg ( 'nextpage', $s->cur_title ),
- "from=" . wfUrlEncode ( $s->cur_title ) );
+ "from=" . wfUrlEncode ( $s->cur_title ) . $namespaceparam );
}
$out2 .= "</td></tr></table><hr />";