r48681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48680‎ | r48681 | r48682 >
Date:13:22, 22 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Expand on r48665 - include multi-rev case
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -52,9 +52,10 @@
5353 return;
5454 }
5555 $this->page = Title::newFromUrl( $this->target );
56 - # If this is just one revision, get the title from it.
57 - # This allows for more flexibility with page moves...
58 - if( count($this->oldids) === 1 ) {
 56+ # If we have revisions, get the title from the first one
 57+ # since they should all be from the same page. This allows
 58+ # for more flexibility with page moves...
 59+ if( count($this->oldids) > 0 ) {
5960 $rev = Revision::newFromId( $this->oldids[0] );
6061 $this->page = $rev ? $rev->getTitle() : $this->page;
6162 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48665RevisionDelete - Improved handling of page movesaaron01:16, 22 March 2009

Status & tagging log