X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategoryViewer.php;h=46a1473a91587f1cdd7129159b794f27fc992ba6;hb=fe675221920cae17f4a905540858afa9a9732199;hp=79ab8b446363d2ec14702f68e89f1024c475c1d2;hpb=4b5773a4de8156c026be2aab92e059793d612fdd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 79ab8b4463..46a1473a91 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -221,8 +221,6 @@ class CategoryViewer extends ContextSource { * @return string */ function getSubcategorySortChar( $title, $sortkey ) { - global $wgContLang; - if ( $title->getPrefixedText() == $sortkey ) { $word = $title->getDBkey(); } else { @@ -231,7 +229,7 @@ class CategoryViewer extends ContextSource { $firstChar = $this->collation->getFirstLetter( $word ); - return $wgContLang->convert( $firstChar ); + return MediaWikiServices::getInstance()->getContentLanguage()->convert( $firstChar ); } /** @@ -242,7 +240,6 @@ class CategoryViewer extends ContextSource { * @param bool $isRedirect */ function addImage( Title $title, $sortkey, $pageLength, $isRedirect = false ) { - global $wgContLang; if ( $this->showGallery ) { $flip = $this->flip['file']; if ( $flip ) { @@ -253,8 +250,8 @@ class CategoryViewer extends ContextSource { } else { $this->imgsNoGallery[] = $this->generateLink( 'image', $title, $isRedirect ); - $this->imgsNoGallery_start_char[] = $wgContLang->convert( - $this->collation->getFirstLetter( $sortkey ) ); + $this->imgsNoGallery_start_char[] = MediaWikiServices::getInstance()-> + getContentLanguage()->convert( $this->collation->getFirstLetter( $sortkey ) ); } } @@ -266,12 +263,10 @@ class CategoryViewer extends ContextSource { * @param bool $isRedirect */ function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { - global $wgContLang; - $this->articles[] = $this->generateLink( 'page', $title, $isRedirect ); - $this->articles_start_char[] = $wgContLang->convert( - $this->collation->getFirstLetter( $sortkey ) ); + $this->articles_start_char[] = MediaWikiServices::getInstance()-> + getContentLanguage()->convert( $this->collation->getFirstLetter( $sortkey ) ); } function finaliseCategoryState() {