r107507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107506‎ | r107507 | r107508 >
Date:18:38, 28 December 2011
Author:awjrichards
Status:ok
Tags:
Comment:
Added some comments about unusual language handling behavior
Modified paths:
  • /trunk/extensions/LandingCheck/SpecialLandingCheck.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LandingCheck/SpecialLandingCheck.php
@@ -145,7 +145,18 @@
146146 global $wgOut, $wgRequest;
147147 $landingPage = $wgRequest->getVal( 'landing_page', 'Donate' );
148148
149 - // Construct new query string for tracking
 149+ /**
 150+ * Construct new query string for tracking
 151+ *
 152+ * NB that both 'language' and 'uselang' get set to
 153+ * $wgRequest->getVal( 'language', 'en')
 154+ * This is wacky, yet by design! This is a unique oddity to fundraising
 155+ * stuff, but CentralNotice converts the 'uselang' parameter to 'language',
 156+ * so when a user clicks on a banner from CentralNotice which sends them
 157+ * to Special:LandingCheck, it has already munged 'uselang' into 'language'.
 158+ * Ultimately, this is something that should probably be rectified in
 159+ * CentralNotice. Until then, this is what we've got.
 160+ */
150161 $tracking = wfArrayToCGI( array(
151162 'utm_source' => $wgRequest->getVal( 'utm_source' ),
152163 'utm_medium' => $wgRequest->getVal( 'utm_medium' ),

Status & tagging log