function categoryMagic ()
{
- global $wgLang ;
+ global $wgLang , $wgUser ;
if ( !$this->mOptions->getUseCategoryMagic() ) return ;
$id = $this->mTitle->getArticleID() ;
$cat = ucfirst ( wfMsg ( "category" ) ) ;
$children = array() ;
- $sk =& $this->mGetSkin();
+# $sk =& $this->mGetSkin();
+ $sk =& $wgUser->getSkin() ;
$doesexist = false ;
if ( $doesexist ) {
$s .= $prefix . "<strong>" . $text . "</strong>" . $trail;
return $s;
}
- if ( $ns == $category && $wgUseCategoryMagic ) {
+ if ( $ns == $category && $this->mOptions->getUseCategoryMagic() ) {
$t = explode ( ":" , $nt->getText() ) ;
array_shift ( $t ) ;
$t = implode ( ":" , $t ) ;
# For some odd PHP bug, this function can't be part of a class
function getCategories ()
{
- global $wgOut , $wgTitle , $wgUseCategoryMagic , $wgUser ;
+ global $wgOut , $wgTitle , $wgUseCategoryMagic , $wgUser , $wgParser ;
if ( !isset ( $wgUseCategoryMagic ) || !$wgUseCategoryMagic ) return "" ;
- if ( count ( $wgOut->mCategoryLinks ) == 0 ) return "" ;
+ if ( count ( $wgParser->mCategoryLinks ) == 0 ) return "" ;
if ( !$wgOut->isArticle() ) return "" ;
$sk = $wgUser->getSkin() ;
$s = "" ;
$s .= "\n<br>\n";
$s .= $sk->makeKnownLink ( "Special:Categories" , "Categories" , "article=".$wgTitle->getDBkey() ) ;
- $t = implode ( " | " , $wgOut->mCategoryLinks ) ;
+ $t = implode ( " | " , $wgParser->mCategoryLinks ) ;
if ( $t != "" ) $s .= " : " ;
$s .= $t ;
return $s ;