Expand on r48665 - include multi-rev case
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 22 Mar 2009 13:22:41 +0000 (13:22 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 22 Mar 2009 13:22:41 +0000 (13:22 +0000)
includes/specials/SpecialRevisiondelete.php

index 6dc1840..7fdb3cc 100644 (file)
@@ -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;
                }