Revision: 52193 Author: siebrand Date: 2009-06-20 09:21:33 +0000 (Sat, 20 Jun 2009)
Log Message: ----------- Suppress display of duplicate getCategoryBottom() if there are no category members to display. Cannot know if completely suppressing this is possible (and show 'category-empty'), because 'until' or 'from' can be set and previous/next *may* give results). Adding a FIXME for that. Modified Paths: -------------- trunk/phase3/includes/CategoryPage.php Modified: trunk/phase3/includes/CategoryPage.php =================================================================== --- trunk/phase3/includes/CategoryPage.php 2009-06-20 09:03:35 UTC (rev 52192) +++ trunk/phase3/includes/CategoryPage.php 2009-06-20 09:21:33 UTC (rev 52193) @@ -95,12 +95,23 @@ $this->doCategoryQuery(); $this->finaliseCategoryState(); - $r = $this->getCategoryTop() . - $this->getSubcategorySection() . + $r = $this->getSubcategorySection() . $this->getPagesSection() . - $this->getImageSection() . - $this->getCategoryBottom(); + $this->getImageSection(); + if( $r == '' ) { + // If there is no category content to display, only + // show the top part of the navigation links. + // FIXME: cannot be completely suppressed because it + // is unknown if 'until' or 'from' makes this + // give 0 results. + $r = $r . $this->getCategoryTop(); + } else { + $r = $this->getCategoryTop() . + $r . + $this->getCategoryBottom(); + } + // Give a proper message if category is empty if ( $r == '' ) { $r = wfMsgExt( 'category-empty', array( 'parse' ) ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs