Phuedx has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311102

Change subject: Remove MFPageActions/MFEnableSiteNotice vars
......................................................................

Remove MFPageActions/MFEnableSiteNotice vars

The MFPageActions and MFEnableSiteNotice config variables were
deprecated in Ib64b9400 (19/02/2016) and can now be removed.

Now that MobileContext::singleton isn't invoked in the extension
registration callback, add a strong warning that it shouldn't be in
future (see I8d57f485 for context).

Bug: T143875
Change-Id: Icb5f9e927304f04cccb045c83190fc46f2076dc7
---
M README.md
M includes/MobileFrontend.hooks.php
2 files changed, 10 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/02/311102/1

diff --git a/README.md b/README.md
index 62ab591..6f6eea4 100644
--- a/README.md
+++ b/README.md
@@ -147,15 +147,6 @@
   ]
 ```
 
-#### $wgMFEnableSiteNotice
-
-Whether site notice's can be shown in the mobile skin.
-
-See: <https://www.mediawiki.org/wiki/Manual:$wgSiteNotice>
-
-* Type: `Boolean`
-* Default: `false`
-
 #### $wgMFIgnoreEventLoggingBucketing
 
 Disable EventLogging bucketing for purposes of development.  When enabled all
@@ -235,6 +226,7 @@
 #### $wgMinervaEnableSiteNotice
 
 Controls whether site notices should be shown.
+See <https://www.mediawiki.org/wiki/Manual:$wgSiteNotice>.
 
 * Type: `Boolean`
 * Default: `false`
@@ -363,12 +355,7 @@
 ```
 
 
-#### $wgMFPageActions (deprecated)
-
-See `$wgMinervaPageActions`.
-
 #### $wgMinervaPageActions
-
 
 Controls which page actions, if any, are displayed. Allowed: `edit`, `watch`, 
`talk`, and
 `switch-language`.
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 56700d0..2ddaa8e 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1415,11 +1415,17 @@
        }
 
        /**
-        * Handler for Extension registration callback
+        * Extension registration callback.
+        *
+        * `extension.json` has parsed and the configuration merged with the 
current state of the
+        * application. `MediaWikiServices` isn't bootstrapped so no services 
defined by extensions are
+        * available.
+        *
+        * @warning DO NOT try to access services defined by MobileFrontend 
here, i.e. DO NOT try to
+        *  access `MobileContext::singleton` here.
         */
        public static function onRegistration() {
-               global $wgResourceLoaderLESSImportPaths, $wgMinervaPageActions, 
$wgMinervaEnableSiteNotice,
-                       $wgDisableAuthManager, $wgAuthManagerAutoConfig;
+               global $wgResourceLoaderLESSImportPaths, $wgDisableAuthManager, 
$wgAuthManagerAutoConfig;
 
                // modify login/registration form
                if ( class_exists( AuthManager::class ) && 
!$wgDisableAuthManager ) {
@@ -1431,19 +1437,6 @@
 
                // Set LESS importpath
                $wgResourceLoaderLESSImportPaths[] = dirname( __DIR__ ) . 
"/minerva.less/";
-
-               $config = MobileContext::singleton()->getConfig();
-
-               // For backwards compatiblity update new Minerva prefixed 
global with old MF value
-               if ( $config->has( 'MFPageActions' ) ) {
-                       // FIXME: Use wfDeprecated to officially deprecate in 
later patchset
-                       $wgMinervaPageActions = $config->get( 'MFPageActions' );
-               }
-               // For backwards compatiblity.
-               if ( $config->has( 'MFEnableSiteNotice' ) ) {
-                       // FIXME: Use wfDeprecated to officially deprecate in 
later patchset
-                       $wgMinervaEnableSiteNotice = $config->get( 
'MFEnableSiteNotice' );
-               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/311102
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb5f9e927304f04cccb045c83190fc46f2076dc7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <g...@samsmith.io>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to