X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRevisiondelete.php;h=7c27ac418c5c82cee4cfd98e7763b4abc217c4b1;hb=e2af4108ae9b0cdada47bf2ca66497384ac9016a;hp=21867b508971101ac7169a0e05a27c5c02ca9d16;hpb=dfebe411507425b6756da4f0b715b60bb1a8039e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 21867b5089..7c27ac418c 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -110,6 +110,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { } public function execute( $par ) { + $this->useTransactionalTimeLimit(); + $this->checkPermissions(); $this->checkReadOnly(); @@ -158,6 +160,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 +178,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 +453,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(), @@ -585,7 +588,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(); @@ -651,14 +654,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 ) ); }