OOUI prefs: Use late static binding
authorEd Sanders <esanders@wikimedia.org>
Fri, 11 May 2018 08:55:59 +0000 (09:55 +0100)
committerEd Sanders <esanders@wikimedia.org>
Fri, 11 May 2018 08:57:04 +0000 (09:57 +0100)
Allow sub-classes to disable OOUI for now (e.g. GlobalPrefs).

Change-Id: Ic3ff878b5f0ba7ec4162fab09fe1b9e10a820095

includes/specials/SpecialPreferences.php

index f67fe9f..1cfcffa 100644 (file)
@@ -36,8 +36,6 @@ class SpecialPreferences extends SpecialPage {
 
        function __construct() {
                parent::__construct( 'Preferences' );
-
-               $this->oouiEnabled = self::isOouiEnabled( $this->getContext() );
        }
 
        /**
@@ -56,6 +54,8 @@ class SpecialPreferences extends SpecialPage {
        }
 
        public function execute( $par ) {
+               $this->oouiEnabled = static::isOouiEnabled( $this->getContext() );
+
                $this->setHeaders();
                $this->outputHeader();
                $out = $this->getOutput();