X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FProtectAction.php;h=2e9e093405129d1f3ff2e37812f17d89f992e1e3;hb=b3b2a72e718cd8c18af9dbb7b1ab80e90dbd79cf;hp=8b2bfaa98301c52ef7efdf5d2c48644687272a03;hpb=81660007b8af86c630752333c54cc0120909ab2a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/ProtectAction.php b/includes/actions/ProtectAction.php index 8b2bfaa983..2e9e093405 100644 --- a/includes/actions/ProtectAction.php +++ b/includes/actions/ProtectAction.php @@ -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; } }