Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1940,6 +1940,9 @@ |
1941 | 1941 | // Update stability config from request |
1942 | 1942 | public static function onProtectionSave( $article, &$errorMsg ) { |
1943 | 1943 | global $wgUser, $wgRequest; |
| 1944 | + $levels = FlaggedRevs::getProtectionLevels(); |
| 1945 | + if( empty($levels) ) |
| 1946 | + return true; // simple custom levels set for action=protect |
1944 | 1947 | if( wfReadOnly() || !$wgUser->isAllowed('stablesettings') ) { |
1945 | 1948 | return true; // user cannot change anything |
1946 | 1949 | } |
— | — | @@ -1953,7 +1956,6 @@ |
1954 | 1957 | $form->expirySelection = $wgRequest->getVal( 'wpExpirySelection' ); # Expiry dropdown |
1955 | 1958 | # Fill in config from the protection level... |
1956 | 1959 | $selected = $wgRequest->getVal( 'wpStabilityConfig' ); |
1957 | | - $levels = FlaggedRevs::getProtectionLevels(); |
1958 | 1960 | if( $selected == "none" ) { |
1959 | 1961 | $form->select = FlaggedRevs::getPrecedence(); // default |
1960 | 1962 | $form->override = FlaggedRevs::showStableByDefault(); // default |