Merge "Fix MultiHttpClient to return correct errors"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisiondelete.php
index 5bd3a29..77ebac3 100644 (file)
@@ -158,6 +158,13 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        $this->ids
                );
 
+               # We need a target page!
+               if ( $this->targetObj === null ) {
+                       $output->addWikiMsg( 'undelete-header' );
+
+                       return;
+               }
+
                $this->typeLabels = self::$UILabels[$this->typeName];
                $list = $this->getList();
                $list->reset();
@@ -169,12 +176,6 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $this->mIsAllowed = $this->mIsAllowed && !( $canViewSuppressedOnly && $pageIsSuppressed );
 
                $this->otherReason = $request->getVal( 'wpReason' );
-               # We need a target page!
-               if ( is_null( $this->targetObj ) ) {
-                       $output->addWikiMsg( 'undelete-header' );
-
-                       return;
-               }
                # Give a link to the logs/hist for this page
                $this->showConvenienceLinks();
 
@@ -450,7 +451,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                Xml::closeElement( 'form' ) . "\n";
                        // Show link to edit the dropdown reasons
                        if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
-                               $link = Linker::link(
+                               $link = Linker::linkKnown(
                                        $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->getTitle(),
                                        $this->msg( 'revdelete-edit-reasonlist' )->escaped(),
                                        array(),