r103260 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103259‎ | r103260 | r103261 >
Date:23:35, 15 November 2011
Author:bawolff
Status:ok (Comments)
Tags:
Comment:
(follow-up r100023; bug 32438) $pagesCount is total number of members a category has, not the number that are "normal" pages.
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -593,6 +593,8 @@
594594 $attr = array( 'class' => 'CategoryTreeBullet' );
595595
596596 # Get counts, with conversion to integer so === works
 597+ # Note: $pageCount is the total number of cat members,
 598+ # not the count of how many members are normal pages.
597599 $pageCount = $cat ? intval( $cat->getPageCount() ) : 0;
598600 $subcatCount = $cat ? intval( $cat->getSubcatCount() ) : 0;
599601 $fileCount = $cat ? intval( $cat->getFileCount() ) : 0;
@@ -664,7 +666,7 @@
665667 $memberNums[] = wfMessage( 'categorytree-num-categories', $wgLang->formatNum( $subcatCount ) )->text();
666668 }
667669 if ( $pageCount ) {
668 - $memberNums[] = wfMessage( 'categorytree-num-pages', $wgLang->formatNum( $pageCount ) )->text();
 670+ $memberNums[] = wfMessage( 'categorytree-num-pages', $wgLang->formatNum( $pages ) )->text();
669671 }
670672 if ( $fileCount ) {
671673 $memberNums[] = wfMessage( 'categorytree-num-files', $wgLang->formatNum( $fileCount ) )->text();

Follow-up revisions

RevisionCommit summaryAuthorDate
r103315(follow-up r103260) fix if condition per Umherirrender, change variable name ...bawolff12:35, 16 November 2011
r106667Narayam and WebFonts to trunk state...nikerabbit18:16, 19 December 2011
r107970MFT r100516, r103260, r103315, r103378, r103382, r104862reedy00:08, 4 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100023Bug 29357: CategoryTree should have built-in localizable support for pretty C...amire8011:35, 17 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:24, 16 November 2011

What a poor naming there.

#Comment by Umherirrender (talk | contribs)   10:22, 16 November 2011

You have also to change:

if ( $pageCount ) {
#Comment by Bawolff (talk | contribs)   12:36, 16 November 2011

d'oh. Should be fixed in r103315

#Comment by G.Hagedorn (talk | contribs)   08:22, 22 December 2011

Please tag for 1.18 as well, this fixes erroneous category page display. Has been applied to 1.18wmf1 in r106667, tag 1.18wmf1 needs to be deleted.

#Comment by G.Hagedorn (talk | contribs)   08:23, 22 December 2011

PS: some additional changes to this in r103315

#Comment by Bawolff (talk | contribs)   22:22, 22 December 2011

This is a follow-up to a revision not in 1.18, thus it doesn't make sense to backport it.

Status & tagging log