X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRevisiondelete.php;h=5ed0483db9467ff3d0232b56a8163f49425db9d3;hb=bcf968010b07d0281d4accf753113610791666ab;hp=7c27ac418c5c82cee4cfd98e7763b4abc217c4b1;hpb=0ea03a7f56070956838ab360a5dccc2a506fc4ff;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 7c27ac418c..5ed0483db9 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -170,11 +170,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $this->typeLabels = self::$UILabels[$this->typeName]; $list = $this->getList(); $list->reset(); - $bitfield = $list->current()->getBits(); $this->mIsAllowed = $user->isAllowed( RevisionDeleter::getRestriction( $this->typeName ) ); $canViewSuppressedOnly = $this->getUser()->isAllowed( 'viewsuppressed' ) && !$this->getUser()->isAllowed( 'suppressrevision' ); - $pageIsSuppressed = $bitfield & Revision::DELETED_RESTRICTED; + $pageIsSuppressed = $list->areAnySuppressed(); $this->mIsAllowed = $this->mIsAllowed && !( $canViewSuppressedOnly && $pageIsSuppressed ); $this->otherReason = $request->getVal( 'wpReason' ); @@ -330,10 +329,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { return; } $this->getOutput()->disable(); - # We mustn't allow the output to be Squid cached, otherwise + # We mustn't allow the output to be CDN cached, otherwise # if an admin previews a deleted image, and it's cached, then # a user without appropriate permissions can toddle off and - # nab the image, and Squid will serve it + # nab the image, and CDN will serve it $this->getRequest()->response()->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); $this->getRequest()->response()->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' @@ -408,6 +407,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { // Show form if the user can submit if ( $this->mIsAllowed ) { + $out->addModuleStyles( 'mediawiki.special' ); + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getPageTitle()->getLocalURL( array( 'action' => 'submit' ) ), 'id' => 'mw-revdel-form-revisions' ) ) .