Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1827,7 +1827,7 @@ |
1828 | 1828 | // Code stolen from Stabilization (which was stolen from ProtectionForm) |
1829 | 1829 | public static function onProtectionForm( $article, &$output ) { |
1830 | 1830 | global $wgUser, $wgRequest, $wgOut, $wgLang; |
1831 | | - if( !FlaggedRevs::useProtectionLevels() ) { |
| 1831 | + if( !FlaggedRevs::useProtectionLevels() || !$article->exists() ) { |
1832 | 1832 | return true; // nothing to do |
1833 | 1833 | } else if( !FlaggedRevs::isPageReviewable( $article->getTitle() ) ) { |
1834 | 1834 | return true; // not a reviewable page |
— | — | @@ -1955,7 +1955,7 @@ |
1956 | 1956 | |
1957 | 1957 | // Add stability log extract to protection form |
1958 | 1958 | public static function insertStabilityLog( $article, $out ) { |
1959 | | - if( !FlaggedRevs::useProtectionLevels() ) { |
| 1959 | + if( !FlaggedRevs::useProtectionLevels() || !$article->exists() ) { |
1960 | 1960 | return true; // nothing to do |
1961 | 1961 | } else if( !FlaggedRevs::isPageReviewable( $article->getTitle() ) ) { |
1962 | 1962 | return true; // not a reviewable page |
— | — | @@ -1970,7 +1970,7 @@ |
1971 | 1971 | public static function onProtectionSave( $article, &$errorMsg ) { |
1972 | 1972 | global $wgUser, $wgRequest; |
1973 | 1973 | $levels = FlaggedRevs::getProtectionLevels(); |
1974 | | - if( empty($levels) ) |
| 1974 | + if( empty($levels) || !$article->exists() ) |
1975 | 1975 | return true; // simple custom levels set for action=protect |
1976 | 1976 | if( wfReadOnly() || !$wgUser->isAllowed('stablesettings') ) { |
1977 | 1977 | return true; // user cannot change anything |