disabling the dmoz-like category browser by defaut
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 6 Jun 2004 04:15:03 +0000 (04:15 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 6 Jun 2004 04:15:03 +0000 (04:15 +0000)
includes/DefaultSettings.php
includes/Skin.php

index b72f52c..0e9e63d 100644 (file)
@@ -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
 
index 1d72b69..0e76bfd 100644 (file)
@@ -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 .= "<br/><hr/>";
-               $catstack = array();
-               $wgTitle->getAllParentCategories(&$catstack);
-               foreach ($catstack as $key => $cat)
-               {
-                       $s .= $this->makeLink($wgLang->getNSText( Namespace::getCategory() ).":".$key, $key )." &gt; ".$cat."<br/>\n";
+               if($wgUseCategoryBrowser) {
+                       $s .= "<br/><hr/>";
+                       $catstack = array();
+                       $wgTitle->getAllParentCategories(&$catstack);
+                       foreach ($catstack as $key => $cat)
+                       {
+                               $s .= $this->makeLink($wgLang->getNSText( Namespace::getCategory() ).":".$key, $key )." &gt; ".$cat."<br/>\n";
+                       }
                }
                
                return $s;