$children, $children_start_char,
$showGallery, $imgsNoGalley,
$imgsNoGallery_start_char,
- $skin, $imgsNoGallery;
+ $imgsNoGallery;
/**
* @var
* @return string HTML output
*/
public function getHTML() {
- global $wgOut, $wgCategoryMagicGallery, $wgContLang, $wgBetterDirectionality;
+ global $wgOut, $wgCategoryMagicGallery;
wfProfileIn( __METHOD__ );
$this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
// Give a proper message if category is empty
if ( $r == '' ) {
$r = wfMsgExt( 'category-empty', array( 'parse' ) );
- }
-
- if( $wgBetterDirectionality ) {
+ } else {
$pageLang = $this->title->getPageLanguage();
$langAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir() );
# close the previous div, show the headings in user language,
}
wfProfileOut( __METHOD__ );
- return $wgContLang->convert( $r );
+ return $r;
}
function clearCategoryState() {
}
}
- /**
- * @return Skin
- */
- function getSkin() {
- if ( !$this->skin ) {
- global $wgUser;
- $this->skin = $wgUser->getSkin();
- }
- return $this->skin;
- }
-
/**
* Add a subcategory to the internal lists, using a Category object
*/
// Subcategory; strip the 'Category' namespace from the link text.
$title = $cat->getTitle();
- $link = $this->getSkin()->link( $title, $title->getText() );
+ $link = Linker::link( $title, htmlspecialchars( $title->getText() ) );
if ( $title->isRedirect() ) {
// This didn't used to add redirect-in-category, but might
// as well be consistent with the rest of the sections
$this->gallery->add( $title );
}
} else {
- $link = $this->getSkin()->link( $title );
+ $link = Linker::link( $title );
if ( $isRedirect ) {
// This seems kind of pointless given 'mw-redirect' class,
// but keeping for back-compatibility with user css.
function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
global $wgContLang;
- $link = $this->getSkin()->link( $title );
+ $link = Linker::link( $title );
if ( $isRedirect ) {
// This seems kind of pointless given 'mw-redirect' class,
// but keeping for back-compatiability with user css.
* @private
*/
function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
- global $wgBetterDirectionality;
-
$list = '';
if ( count ( $articles ) > $cutoff ) {
$list = self::columnList( $articles, $articles_start_char );
$list = self::shortList( $articles, $articles_start_char );
}
- if( $wgBetterDirectionality ) {
- $pageLang = $this->title->getPageLanguage();
- $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
- 'class' => 'mw-content-'.$pageLang->getDir() );
- $list = Html::rawElement( 'div', $attribs, $list );
- }
+ $pageLang = $this->title->getPageLanguage();
+ $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
+ 'class' => 'mw-content-'.$pageLang->getDir() );
+ $list = Html::rawElement( 'div', $attribs, $list );
return $list;
}
*/
private function pagingLinks( $first, $last, $type = '' ) {
global $wgLang;
- $sk = $this->getSkin();
+
$limitText = $wgLang->formatNum( $this->limit );
$prevLink = wfMsgExt( 'prevn', array( 'escape', 'parsemag' ), $limitText );
$prevQuery = $this->query;
$prevQuery["{$type}until"] = $first;
unset( $prevQuery["{$type}from"] );
- $prevLink = $sk->linkKnown(
+ $prevLink = Linker::linkKnown(
$this->addFragmentToTitle( $this->title, $type ),
$prevLink,
array(),
$lastQuery = $this->query;
$lastQuery["{$type}from"] = $last;
unset( $lastQuery["{$type}until"] );
- $nextLink = $sk->linkKnown(
+ $nextLink = Linker::linkKnown(
$this->addFragmentToTitle( $this->title, $type ),
$nextLink,
array(),