r56523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56522‎ | r56523 | r56524 >
Date:15:24, 17 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix bug 20688 (Hidden categories still hidden if there are no non-hidden categories and the showhiddencats option is on). Regression in r55573.
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -895,11 +895,17 @@
896896 }
897897
898898 function getCategories() {
899 - $catlinks=$this->getCategoryLinks();
 899+ $catlinks = $this->getCategoryLinks();
900900
901901 $classes = 'catlinks';
 902+
 903+ // Check what we're showing
 904+ global $wgOut, $wgUser;
 905+ $allCats = $wgOut->getCategoryLinks();
 906+ $showHidden = $wgUser->getBoolOption( 'showhiddencats' ) ||
 907+ $this->mTitle->getNamespace() == NS_CATEGORY;
902908
903 - if( strpos( $catlinks, '<div id="mw-normal-catlinks">' ) === false ) {
 909+ if( empty($allCats['normal']) && !( !empty($allCats['hidden']) && $showHidden ) ) {
904910 $classes .= ' catlinks-allhidden';
905911 }
906912

Follow-up revisions

RevisionCommit summaryAuthorDate
r56526Merge r56523, fix for hidden category display when user has opted into itwerdna15:29, 17 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55573Fix live preview copying of existing category linkswerdna15:09, 25 August 2009

Status & tagging log