X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRevisiondelete.php;h=77ebac3efef889036909c6a89d7063b15b786eeb;hb=e19a52f2f5376b08c303d31bdcfec56da560f2b0;hp=c0441462c613ec1d2c384980e2f78487d766d449;hpb=d1150378f15b4dd699220bee41d0ce3af8868a18;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index c0441462c6..77ebac3efe 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -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,9 +451,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { Xml::closeElement( 'form' ) . "\n"; // Show link to edit the dropdown reasons if ( $this->getUser()->isAllowed( 'editinterface' ) ) { - $title = Title::makeTitle( NS_MEDIAWIKI, 'Revdelete-reason-dropdown' ); - $link = Linker::link( - $title, + $link = Linker::linkKnown( + $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->getTitle(), $this->msg( 'revdelete-edit-reasonlist' )->escaped(), array(), array( 'action' => 'edit' ) @@ -586,7 +586,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { throw new PermissionsError( 'suppressrevision' ); } # If the save went through, go to success message... - $status = $this->save( $bitParams, $comment, $this->targetObj ); + $status = $this->save( $bitParams, $comment ); if ( $status->isGood() ) { $this->success(); @@ -652,14 +652,13 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { /** * Do the write operations. Simple wrapper for RevDel*List::setVisibility(). - * @param int $bitfield + * @param array $bitPars ExtractBitParams() bitfield array * @param string $reason - * @param Title $title * @return Status */ - protected function save( $bitfield, $reason, $title ) { + protected function save( array $bitPars, $reason ) { return $this->getList()->setVisibility( - array( 'value' => $bitfield, 'comment' => $reason ) + array( 'value' => $bitPars, 'comment' => $reason ) ); }