Merge "Check normalization rules of usernames during signup"
[lhc/web/wiklou.git] / includes / actions / ProtectAction.php
index 8b2bfaa..2e9e093 100644 (file)
@@ -41,26 +41,18 @@ class ProtectAction extends FormlessAction {
        }
 
        public function show() {
+               if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+                       $out = $this->getOutput();
+                       $out->addModuleStyles( [
+                               'mediawiki.ui.input',
+                               'mediawiki.ui.checkbox',
+                       ] );
+               }
 
                $this->page->protect();
        }
-}
-
-/**
- * Handle page unprotection
- *
- * This is a wrapper that will call Article::unprotect().
- *
- * @ingroup Actions
- */
-class UnprotectAction extends ProtectAction {
-
-       public function getName() {
-               return 'unprotect';
-       }
-
-       public function show() {
 
-               $this->page->unprotect();
+       public function doesWrites() {
+               return true;
        }
 }