r70030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70029‎ | r70030 | r70031 >
Date:19:55, 27 July 2010
Author:simetrical
Status:ok
Tags:
Comment:
Remove dead code added in r36814

None of the constructors will set $this->mTitle but not $this->mName,
and those are both private member variables. r69813 demonstrates that
no one had ever hit this code since it was first added in June 2008,
because it would have resulted in a fatal.
Modified paths:
  • /trunk/phase3/includes/Category.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Category.php
@@ -25,10 +25,6 @@
2626 * @return bool True on success, false on failure.
2727 */
2828 protected function initialize() {
29 - if ( $this->mName === null && $this->mTitle ) {
30 - $this->mName = $this->mTitle->getDBkey();
31 - }
32 -
3329 if ( $this->mName === null && $this->mID === null ) {
3430 throw new MWException( __METHOD__ . ' has both names and IDs null' );
3531 } elseif ( $this->mID === null ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r36814Make member counts from the new category table available for subcategories, b...daniel14:06, 30 June 2008
r69813$title undefined in initialize...reedy20:35, 23 July 2010

Status & tagging log