r63737 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63736‎ | r63737 | r63738 >
Date:13:16, 14 March 2010
Author:aaron
Status:ok
Tags:
Comment:
Cleanup: check useProtectionLevels() over getProtectionLevels() in a few places
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -938,8 +938,9 @@
939939 public function addVisibilityLink( &$data ) {
940940 global $wgUser, $wgRequest, $wgOut;
941941 $this->load();
942 - if ( FlaggedRevs::getProtectionLevels() )
 942+ if ( FlaggedRevs::useProtectionLevels() ) {
943943 return true; // simple custom levels set for action=protect
 944+ }
944945 # Check only if the title is reviewable
945946 if ( !FlaggedRevs::inReviewNamespace( $this->article->getTitle() ) ) {
946947 return true;
@@ -973,7 +974,7 @@
974975 public function setActionTabs( $skin, &$actions ) {
975976 global $wgUser;
976977 $this->load();
977 - if ( FlaggedRevs::getProtectionLevels() ) {
 978+ if ( FlaggedRevs::useProtectionLevels() ) {
978979 return true; // simple custom levels set for action=protect
979980 }
980981 $title = $this->article->getTitle()->getSubjectPage();
@@ -987,10 +988,10 @@
988989 !isset( $actions['protect'] ) &&
989990 !isset( $actions['unprotect'] ) &&
990991 $wgUser->isAllowed( 'stablesettings' ) &&
991 - $title->exists()
992 - ) {
 992+ $title->exists() )
 993+ {
993994 $stableTitle = SpecialPage::getTitleFor( 'Stabilization' );
994 - // Add a tab
 995+ // Add the tab
995996 $actions['default'] = array(
996997 'class' => false,
997998 'text' => wfMsg( 'stabilization-tab' ),

Status & tagging log