Merge "Use config instead of globals for OutputPage"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisiondelete.php
index 9cec847..7eea71d 100644 (file)
@@ -160,6 +160,14 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                if ( !$this->typeName || count( $this->ids ) == 0 ) {
                        throw new ErrorPageError( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
                }
+
+               # Allow the list type to adjust the passed target
+               $this->targetObj = RevisionDeleter::suggestTarget(
+                       $this->typeName,
+                       $this->targetObj,
+                       $this->ids
+               );
+
                $this->typeLabels = self::$UILabels[$this->typeName];
                $list = $this->getList();
                $list->reset();
@@ -170,13 +178,6 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $pageIsSuppressed = $bitfield & Revision::DELETED_RESTRICTED;
                $this->mIsAllowed = $this->mIsAllowed && !( $canViewSuppressedOnly && $pageIsSuppressed );
 
-               # Allow the list type to adjust the passed target
-               $this->targetObj = RevisionDeleter::suggestTarget(
-                       $this->typeName,
-                       $this->targetObj,
-                       $this->ids
-               );
-
                $this->otherReason = $request->getVal( 'wpReason' );
                # We need a target page!
                if ( is_null( $this->targetObj ) ) {
@@ -621,6 +622,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
        /**
         * Report that the submit operation failed
+        * @param Status $status
         */
        protected function failure( $status ) {
                // Messages: revdelete-failure, logdelete-failure