From: Tim Starling Date: Fri, 25 Aug 2006 07:33:55 +0000 (+0000) Subject: CategoryPage bug fix X-Git-Tag: 1.31.0-rc.0~55907 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=c06507c4e2cec46b98a767e6ba2454f227e1f89c;p=lhc%2Fweb%2Fwiklou.git CategoryPage bug fix --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index fb6dcea71b..63ac24b2e7 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -22,6 +22,7 @@ function __autoload($className) { 'Block' => 'includes/Block.php', 'CacheManager' => 'includes/CacheManager.php', 'CategoryPage' => 'includes/CategoryPage.php', + 'CategoryViewer' => 'includes/CategoryPage.php', 'Categoryfinder' => 'includes/Categoryfinder.php', 'RCCacheEntry' => 'includes/ChangesList.php', 'ChangesList' => 'includes/ChangesList.php', diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index f00bc5cdfd..a47017ff4c 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -52,7 +52,7 @@ class CategoryViewer { $showGallery, $gallery, $skin; - function __construct( $title, $from, $until ) { + function __construct( $title, $from = '', $until = '' ) { global $wgCategoryPagingLimit; $this->title = $title; $this->from = $from; @@ -120,13 +120,12 @@ class CategoryViewer { // entry in the categorylinks table is Category:A, not A, which it SHOULD be. // Workaround: If sortkey == "Category:".$title, than use $title for sorting, // else use sortkey... - $sortkey = ''; if( $title->getPrefixedText() == $sortkey ) { - $sortkey = $wgContLang->firstChar( $title->getDBkey() ); + $firstChar = $wgContLang->firstChar( $title->getDBkey() ); } else { - $sortkey = $wgContLang->firstChar( $sortkey ); + $firstChar = $wgContLang->firstChar( $sortkey ); } - $this->children_start_char[] = $wgContLang->convert( $sortkey ); + $this->children_start_char[] = $wgContLang->convert( $firstChar ); } /**