jenkins-bot has submitted this change and it was merged. 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 Depends-On: Icb2f18c532f8e237df2c4d7d625647c4ea7eb1e0 Change-Id: Icb5f9e927304f04cccb045c83190fc46f2076dc7 --- M README.md M includes/MobileFrontend.hooks.php 2 files changed, 9 insertions(+), 30 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified 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 dd7a7ea..7518f70 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1434,11 +1434,16 @@ } /** - * 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. */ public static function onRegistration() { - global $wgResourceLoaderLESSImportPaths, $wgMinervaPageActions, $wgMinervaEnableSiteNotice, - $wgDisableAuthManager, $wgAuthManagerAutoConfig; + global $wgResourceLoaderLESSImportPaths, $wgDisableAuthManager; // modify login/registration form if ( class_exists( AuthManager::class ) && !$wgDisableAuthManager ) { @@ -1450,19 +1455,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: merged Gerrit-Change-Id: Icb5f9e927304f04cccb045c83190fc46f2076dc7 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Phuedx <g...@samsmith.io> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Phuedx <g...@samsmith.io> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits