X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPrefixindex.php;h=f7906dbb2977fd10c894da7fb4a763ecd8ff8d0c;hb=b6a1f3bc774d043c69e9ed2875210049cdda9d68;hp=3ca3a85307655c79a7ec5765ba0924bae38e9625;hpb=97402532d48de203925a850a4afa2d8f43e3dd9f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 3ca3a85307..f7906dbb29 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -48,8 +48,6 @@ class SpecialPrefixindex extends SpecialAllPages { * @param string $par Becomes "FOO" when called like Special:Prefixindex/FOO (default null) */ function execute( $par ) { - global $wgContLang; - $this->setHeaders(); $this->outputHeader(); @@ -65,7 +63,7 @@ class SpecialPrefixindex extends SpecialAllPages { $this->hideRedirects = $request->getBool( 'hideredirects', $this->hideRedirects ); $this->stripPrefix = $request->getBool( 'stripprefix', $this->stripPrefix ); - $namespaces = $wgContLang->getNamespaces(); + $namespaces = MediaWikiServices::getInstance()->getContentLanguage()->getNamespaces(); $out->setPageTitle( ( $namespace > 0 && array_key_exists( $namespace, $namespaces ) ) ? $this->msg( 'prefixindex-namespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) @@ -138,20 +136,18 @@ class SpecialPrefixindex extends SpecialAllPages { } /** - * @param int $namespace Default NS_MAIN + * @param int $namespace * @param string $prefix - * @param string $from List all pages from this name (default false) + * @param string|null $from List all pages from this name (default false) */ - protected function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) { - global $wgContLang; - + protected function showPrefixChunk( $namespace, $prefix, $from = null ) { if ( $from === null ) { $from = $prefix; } $fromList = $this->getNamespaceKeyAndText( $namespace, $from ); $prefixList = $this->getNamespaceKeyAndText( $namespace, $prefix ); - $namespaces = $wgContLang->getNamespaces(); + $namespaces = MediaWikiServices::getInstance()->getContentLanguage()->getNamespaces(); $res = null; $n = 0; $nextRow = null;