Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/179009
Change subject: Promoting WikiGrok to stable and disabling for anons (with flag) ...................................................................... Promoting WikiGrok to stable and disabling for anons (with flag) See: https://trello.com/c/oE0pz4EK/5-5-wikigrok-a-b-test-in-stable-logged-in Change-Id: Id0b1bdc26636c51abb405566eb1a5a39346fe10b (cherry picked from commit Id0b1bdc26636c51abb405566eb1a5a39346fe10b) --- M MobileFrontend.php M includes/MobileFrontend.hooks.php M includes/Resources.php M javascripts/modules/wikigrok/WikiGrokDialog.js M javascripts/modules/wikigrok/WikiGrokDialogB.js M javascripts/modules/wikigrok/WikiGrokMoreInfo.js M javascripts/modules/wikigrok/init.js 7 files changed, 10 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/09/179009/1 diff --git a/MobileFrontend.php b/MobileFrontend.php index 857678e..a257efa 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -549,7 +549,13 @@ $wgMFEnableWikiGrok = false; /** - * Controls whether the WikiGrok is permitted on all devices + * Controls whether WikiGrok is displayed to anonymous users + * (If $wgMFEnableWikiGrok is false, this setting is moot) + */ +$wgMFEnableWikiGrokForAnons = false; + +/** + * Controls whether WikiGrok is permitted on all devices */ $wgMFEnableWikiGrokOnAllDevices = false; diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index a9aa607..3600ba0 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -362,7 +362,7 @@ */ public static function onResourceLoaderGetConfigVars( &$vars ) { global $wgMFNearbyEndpoint, $wgMFContentNamespace, $wgMFEnableWikiGrok, - $wgMFEnableWikiGrokOnAllDevices; + $wgMFEnableWikiGrokForAnons, $wgMFEnableWikiGrokOnAllDevices; $vars['wgMFNearbyEndpoint'] = $wgMFNearbyEndpoint; $vars['wgMFThumbnailSizes'] = array( 'tiny' => MobilePage::TINY_IMAGE_WIDTH, @@ -372,6 +372,7 @@ $vars['wgMFContentNamespace'] = $wgMFContentNamespace; // Requires WikiGrok extension $vars['wgMFEnableWikiGrok'] = $wgMFEnableWikiGrok && class_exists( 'WikiGrok\Api\ApiResponse' ); + $vars['wgMFEnableWikiGrokForAnons'] = $wgMFEnableWikiGrokForAnons; $vars['wgMFEnableWikiGrokOnAllDevices'] = $wgMFEnableWikiGrokOnAllDevices; // Set the licensing agreement that is displayed in the editor. diff --git a/includes/Resources.php b/includes/Resources.php index 5dc50b4..df3c77e 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -1269,6 +1269,7 @@ 'mobile.search', 'mobile.references', 'mobile.redirect', + 'mobile.wikigrok', // FIXME: only load when uploads enabled 'mobile.upload.ui', ), @@ -1285,7 +1286,6 @@ // Feature modules that should be loaded in beta should be listed below here. // These modules should only setup routes/events or // load code under certain conditions. - 'mobile.wikigrok', 'mobile.preferredLanguages', 'mobile.references.beta', ), diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js b/javascripts/modules/wikigrok/WikiGrokDialog.js index 6dbcd99..0a5393f 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialog.js +++ b/javascripts/modules/wikigrok/WikiGrokDialog.js @@ -1,6 +1,4 @@ ( function ( M, $ ) { - M.assertMode( [ 'beta', 'alpha' ] ); - var Panel = M.require( 'Panel' ), settings = M.require( 'settings' ), WikiGrokResponseApi = M.require( 'modules/wikigrok/WikiGrokResponseApi' ), diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js b/javascripts/modules/wikigrok/WikiGrokDialogB.js index 7b10779..805ea90 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialogB.js +++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js @@ -1,6 +1,4 @@ ( function ( M, $ ) { - M.assertMode( [ 'beta', 'alpha' ] ); - var WikiGrokDialog = M.require( 'modules/wikigrok/WikiGrokDialog' ), WikiGrokDialogB; diff --git a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js index 3cfa621..bb65a2d 100644 --- a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js +++ b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js @@ -1,6 +1,4 @@ ( function ( M ) { - M.assertMode( [ 'beta', 'alpha' ] ); - var Overlay = M.require( 'Overlay' ), WikiGrokMoreInfo; diff --git a/javascripts/modules/wikigrok/init.js b/javascripts/modules/wikigrok/init.js index 0b402f7..e2120cc 100644 --- a/javascripts/modules/wikigrok/init.js +++ b/javascripts/modules/wikigrok/init.js @@ -1,8 +1,5 @@ // Determine whether or not it is appropriate to load WikiGrok, and if so, load it. ( function ( M, $ ) { - // Only run in alpha or beta mode - M.assertMode( [ 'beta', 'alpha' ] ); - var wikidataID = mw.config.get( 'wgWikibaseItemId' ), errorSchema = M.require( 'loggingSchemas/mobileWebWikiGrokError' ), settings = M.require( 'settings' ), -- To view, visit https://gerrit.wikimedia.org/r/179009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0b1bdc26636c51abb405566eb1a5a39346fe10b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.25wmf11 Gerrit-Owner: Kaldari <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
