From 325395d4c9d81e77f94675d597ea55a32072acb6 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 22 Mar 2009 13:22:41 +0000 Subject: [PATCH] Expand on r48665 - include multi-rev case --- includes/specials/SpecialRevisiondelete.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 6dc18408da..7fdb3cc4dc 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -52,9 +52,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { return; } $this->page = Title::newFromUrl( $this->target ); - # If this is just one revision, get the title from it. - # This allows for more flexibility with page moves... - if( count($this->oldids) === 1 ) { + # If we have revisions, get the title from the first one + # since they should all be from the same page. This allows + # for more flexibility with page moves... + if( count($this->oldids) > 0 ) { $rev = Revision::newFromId( $this->oldids[0] ); $this->page = $rev ? $rev->getTitle() : $this->page; } -- 2.20.1