From 69e040aaa5fcf5a038014c3d1386e8715333db94 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 6 Jun 2004 04:15:03 +0000 Subject: [PATCH] disabling the dmoz-like category browser by defaut --- includes/DefaultSettings.php | 5 +++++ includes/Skin.php | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b72f52c73c..0e9e63d4a9 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -142,6 +142,11 @@ $wgIgnoreSQLErrors = false; # all articles in the category) $wgUseCategoryMagic = true; +# disable experimental dmoz-like category browsing. Output things like: +# Encyclopedia > Music > Style of Music > Jazz +# FIXME: need fixing +$wgUseCategoryBrowser = false; + $wgEnablePersistentLC = false; # Persistent link cache in linkscc table; FAILS on MySQL 3.x $wgCompressedPersistentLC = true; # use gzcompressed blobs diff --git a/includes/Skin.php b/includes/Skin.php index 1d72b69c9f..0e76bfd860 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -360,7 +360,7 @@ class Skin { function getCategoryLinks () { global $wgOut, $wgTitle, $wgUser, $wgParser; - global $wgUseCategoryMagic, $wgLang; + global $wgUseCategoryMagic, $wgUseCategoryBrowser, $wgLang; if( !$wgUseCategoryMagic ) return "" ; if( count( $wgOut->mCategoryLinks ) == 0 ) return ""; if( !$wgOut->isArticle() ) return ""; @@ -370,12 +370,14 @@ class Skin { wfMsg( "categories" ), "article=" . urlencode( $wgTitle->getPrefixedDBkey() ) ) . ": " . $t; - $s .= "

"; - $catstack = array(); - $wgTitle->getAllParentCategories(&$catstack); - foreach ($catstack as $key => $cat) - { - $s .= $this->makeLink($wgLang->getNSText( Namespace::getCategory() ).":".$key, $key )." > ".$cat."
\n"; + if($wgUseCategoryBrowser) { + $s .= "

"; + $catstack = array(); + $wgTitle->getAllParentCategories(&$catstack); + foreach ($catstack as $key => $cat) + { + $s .= $this->makeLink($wgLang->getNSText( Namespace::getCategory() ).":".$key, $key )." > ".$cat."
\n"; + } } return $s; -- 2.20.1