jenkins-bot has submitted this change and it was merged.
Change subject: Move isWelcomeCreation from E3Experiments.
......................................................................
Move isWelcomeCreation from E3Experiments.
Change-Id: Ib65409801f9c5c9cd9e92de5e2a146b0fe34f6d8
---
M GettingStarted.hooks.php
M GettingStarted.php
2 files changed, 20 insertions(+), 0 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php
index 433c5ea..68feb3c 100644
--- a/GettingStarted.hooks.php
+++ b/GettingStarted.hooks.php
@@ -7,6 +7,23 @@
*/
class GettingStartedHooks {
+ public static $isWelcomeCreation = false;
+
+ /**
+ * MakeGlobalVariablesScript hook.
+ * Add config vars to mw.config.
+ *
+ * @param $vars array
+ * @param $out OutputPage output page
+ * @return bool
+ */
+ public static function onMakeGlobalVariablesScript( &$vars, $out ) {
+ if ( self::$isWelcomeCreation ) {
+ $vars[ 'wgIsWelcomeCreation' ] = true;
+ }
+ return true;
+ }
+
/**
* Adds the openTask module to the page
*
@@ -66,6 +83,8 @@
public static function onBeforeWelcomeCreation( &$welcomeCreationMsg,
&$injectHtml ) {
global $wgOut, $wgUser;
+ self::$isWelcomeCreation = true;
+
// Do nothing on mobile.
if ( class_exists( 'MobileContext' ) ) {
if (
MobileContext::singleton()->shouldDisplayMobileView() ) {
diff --git a/GettingStarted.php b/GettingStarted.php
index 2b073dc..21194a9 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -152,3 +152,4 @@
$wgHooks[ 'CategoryAfterPageRemoved' ][] =
'RedisCategorySync::onCategoryAfterPageRemoved';
$wgHooks[ 'LinksUpdateComplete' ][] =
'RedisCategorySync::onLinksUpdateComplete';
$wgHooks[ 'ListDefinedTags' ][] = 'GettingStartedHooks::onListDefinedTags';
+$wgHooks[ 'MakeGlobalVariablesScript' ][] =
'GettingStartedHooks::onMakeGlobalVariablesScript';
--
To view, visit https://gerrit.wikimedia.org/r/56364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib65409801f9c5c9cd9e92de5e2a146b0fe34f6d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Swalling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits