* @return string HTML output
*/
public function getHTML() {
- global $wgOut, $wgCategoryMagicGallery, $wgContLang;
+ global $wgOut, $wgCategoryMagicGallery, $wgContLang, $wgBetterDirectionality;
wfProfileIn( __METHOD__ );
$this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
$r = wfMsgExt( 'category-empty', array( 'parse' ) );
}
- global $wgBetterDirectionality, $wgTitle;
if( $wgBetterDirectionality ) {
- $pageLang = $wgTitle->getPageLanguage();
+ $pageLang = $this->title->getPageLanguage();
$langAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir() );
# close the previous div, show the headings in user language,
# then open a new div with the page content language again
* @private
*/
function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
+ global $wgBetterDirectionality;
+
$list = '';
if ( count ( $articles ) > $cutoff ) {
$list = self::columnList( $articles, $articles_start_char );
// for short lists of articles in categories.
$list = self::shortList( $articles, $articles_start_char );
}
- global $wgBetterDirectionality, $wgTitle;
+
if( $wgBetterDirectionality ) {
- $pageLang = $wgTitle->getPageLanguage();
+ $pageLang = $this->title->getPageLanguage();
$attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
'class' => 'mw-content-'.$pageLang->getDir() );
$list = Html::rawElement( 'div', $attribs, $list );