ParserTests: Add a video file to parser test suite
[lhc/web/wiklou.git] / includes / actions / ProtectAction.php
index 1b55a3c..48909cf 100644 (file)
  * @author Timo Tijhof
  */
 
+/**
+ * Handle page protection
+ *
+ * This is a wrapper that will call Article::protect().
+ *
+ * @ingroup Actions
+ */
 class ProtectAction extends FormlessAction {
 
        public function getName() {
@@ -34,23 +41,14 @@ class ProtectAction extends FormlessAction {
        }
 
        public function show() {
+               if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+                       $out = $this->getOutput();
+                       $out->addModuleStyles( array(
+                               'mediawiki.ui.input',
+                               'mediawiki.ui.checkbox',
+                       ) );
+               }
 
                $this->page->protect();
-
-       }
-
-}
-
-class UnprotectAction extends ProtectAction {
-
-       public function getName() {
-               return 'unprotect';
        }
-
-       public function show() {
-
-               $this->page->unprotect();
-
-       }
-
 }