Use getConfig on local context to get configuration settings in Action
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 16 Aug 2014 19:25:16 +0000 (21:25 +0200)
committerMattflaschen <mflaschen@wikimedia.org>
Tue, 19 Aug 2014 03:42:49 +0000 (03:42 +0000)
Follow-up I47db5eab45 (aa15d528)

Change-Id: I76409f5fc61e5d35235f964e094dd8881bcc8311

includes/actions/DeleteAction.php
includes/actions/EditAction.php
includes/actions/ProtectAction.php

index 9dc1049..12f0dff 100644 (file)
@@ -41,8 +41,7 @@ class DeleteAction extends FormlessAction {
        }
 
        public function show() {
-               global $wgUseMediaWikiUIEverywhere;
-               if ( $wgUseMediaWikiUIEverywhere ) {
+               if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
                        $out = $this->getOutput();
                        $out->addModuleStyles( array(
                                'mediawiki.ui.input',
index aaf4526..8876724 100644 (file)
@@ -41,8 +41,7 @@ class EditAction extends FormlessAction {
        }
 
        public function show() {
-               global $wgUseMediaWikiUIEverywhere;
-               if ( $wgUseMediaWikiUIEverywhere ) {
+               if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
                        $out = $this->getOutput();
                        $out->addModuleStyles( array(
                                'mediawiki.ui.input',
index 443660b..a7f1ac3 100644 (file)
@@ -41,8 +41,7 @@ class ProtectAction extends FormlessAction {
        }
 
        public function show() {
-               global $wgUseMediaWikiUIEverywhere;
-               if ( $wgUseMediaWikiUIEverywhere ) {
+               if ( $this->getContext()->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
                        $out = $this->getOutput();
                        $out->addModuleStyles( array(
                                'mediawiki.ui.input',