Mattflaschen has uploaded a new change for review.

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


Change subject: Add split test with control being shown core landing page.
......................................................................

Add split test with control being shown core landing page.

Change-Id: I5b596681aff351e629475632eae8b078d5c4ccac
---
M GettingStarted.hooks.php
1 file changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/14/53314/1

diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php
index 7df019a..b123be2 100644
--- a/GettingStarted.hooks.php
+++ b/GettingStarted.hooks.php
@@ -64,7 +64,7 @@
        }
 
        public static function onBeforeWelcomeCreation( &$welcomeCreationMsg, 
&$injectHtml ) {
-               global $wgOut;
+               global $wgOut, $wgUser;
 
                // Do nothing on mobile.
                if ( class_exists( 'MobileContext' ) ) {
@@ -73,14 +73,17 @@
                        }
                }
 
-               // Replace default message with blank one
-               $welcomeCreationMsg = 'gettingstarted-msg';
-               $specialGS = new SpecialGettingStarted();
-               $injectHtml = $specialGS->getHtmlResult() . $injectHtml;
+               // Activate for users with even user IDs.
+               if ( ( $wgUser->getId() % 2 ) === 0 ) {
+                       // Replace default message with blank one
+                       $welcomeCreationMsg = 'gettingstarted-msg';
+                       $specialGS = new SpecialGettingStarted();
+                       $injectHtml = $specialGS->getHtmlResult() . $injectHtml;
 
-               $wgOut->addModuleStyles( 'ext.gettingstarted.styles' );
+                       $wgOut->addModuleStyles( 'ext.gettingstarted.styles' );
 
-               $wgOut->addModules( 'ext.gettingstarted.accountcreation' );
+                       $wgOut->addModules( 
'ext.gettingstarted.accountcreation' );
+               }
 
                return true;
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b596681aff351e629475632eae8b078d5c4ccac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to