r86989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86988‎ | r86989 | r86990 >
Date:21:43, 26 April 2011
Author:reedy
Status:ok
Tags:
Comment:
MFT r80406
Modified paths:
  • /branches/REL1_17/phase3 (modified) (history)
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/CategoryPage.php
@@ -44,14 +44,23 @@
4545
4646 /**
4747 * Don't return a 404 for categories in use.
 48+ * In use defined as: either the actual page exists
 49+ * or the category currently has members.
4850 */
4951 function hasViewableContent() {
5052 if ( parent::hasViewableContent() ) {
5153 return true;
5254 } else {
5355 $cat = Category::newFromTitle( $this->mTitle );
54 - return $cat->getId() != 0;
 56+ // If any of these are not 0, then has members
 57+ if ( $cat->getPageCount()
 58+ || $cat->getSubcatCount()
 59+ || $cat->getFileCount()
 60+ ) {
 61+ return true;
 62+ }
5563 }
 64+ return false;
5665 }
5766
5867 function openShowCategory() {
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -528,6 +528,8 @@
529529 * (bug 28306) Fix exposure of suppressed usernames in ForeignDBRepo
530530 * (bug 28444) Fix regression: edit-on-doubleclick retains revision id again
531531 * UtfNormal::cleanUp on an invalid utf-8 sequence no longer returns false if intl installed.
 532+* (bug 26729) Category pages should return 404 if they do not exist and have no
 533+ members.
532534
533535 === API changes in 1.17 ===
534536 * BREAKING CHANGE: action=patrol now requires POST
Property changes on: branches/REL1_17/phase3
___________________________________________________________________
Modified: svn:mergeinfo
535537 Merged /trunk/phase3:r80406

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80406(bug 26729) Categories that do not have a page, and have no members,...bawolff21:59, 15 January 2011

Status & tagging log