r57475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57474‎ | r57475 | r57476 >
Date:18:30, 7 October 2009
Author:aaron
Status:ok
Tags:
Comment:
merged r57474
Modified paths:
  • /branches/wmf-deployment/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1940,6 +1940,9 @@
19411941 // Update stability config from request
19421942 public static function onProtectionSave( $article, &$errorMsg ) {
19431943 global $wgUser, $wgRequest;
 1944+ $levels = FlaggedRevs::getProtectionLevels();
 1945+ if( empty($levels) )
 1946+ return true; // simple custom levels set for action=protect
19441947 if( wfReadOnly() || !$wgUser->isAllowed('stablesettings') ) {
19451948 return true; // user cannot change anything
19461949 }
@@ -1953,7 +1956,6 @@
19541957 $form->expirySelection = $wgRequest->getVal( 'wpExpirySelection' ); # Expiry dropdown
19551958 # Fill in config from the protection level...
19561959 $selected = $wgRequest->getVal( 'wpStabilityConfig' );
1957 - $levels = FlaggedRevs::getProtectionLevels();
19581960 if( $selected == "none" ) {
19591961 $form->select = FlaggedRevs::getPrecedence(); // default
19601962 $form->override = FlaggedRevs::showStableByDefault(); // default

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57474Protection hook should do nothing unless custom "protection levels" are popul...aaron18:27, 7 October 2009

Status & tagging log