r112267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112266‎ | r112267 | r112268 >
Date:23:19, 23 February 2012
Author:catrope
Status:ok
Tags:
Comment:
Allow disabling of the ClickTracking invocation in CustomUserSignup, and disable it by default
Modified paths:
  • /trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php (modified) (history)
  • /trunk/extensions/CustomUserSignup/CustomUserSignup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CustomUserSignup/CustomUserSignup.php
@@ -44,6 +44,8 @@
4545
4646 $wgCustomUserSignupVersion = 1;
4747 $wgCustomUserSignupSetBuckets = true;
 48+// If true, log each account creation to ClickTracking
 49+$wgCustomUserSignupTrackAccountCreations = false;
4850 // For Account Creation Project
4951 if ( class_exists( 'ClickTrackingHooks' ) ) {
5052 ClickTrackingHooks::addCampaign($dir. 'modules', 'CustomUserSignup/modules', 'AccountCreationUserBucket' );
Index: trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php
@@ -116,7 +116,7 @@
117117 }
118118
119119 public static function addNewAccount( $user, $byEmail ){
120 - global $wgRequest, $wgTitle;
 120+ global $wgRequest, $wgTitle, $wgCustomUserSignupTrackAccountCreations;
121121 $buckets = ClickTrackingHooks::unpackBucketInfo();
122122 if(isset($buckets['AccountCreation']) && $buckets['AccountCreation'][0] != "none"){
123123
@@ -126,7 +126,7 @@
127127 time() + 60 * 60 * 24 * 365 , '/' );
128128
129129 $session = $wgRequest->getCookie( 'clicktracking-session', "" );
130 - if ( $session !== null ) {
 130+ if ( $session !== null && $wgCustomUserSignupTrackAccountCreations ) {
131131 $params = new FauxRequest( array(
132132 'action' => 'clicktracking',
133133 'eventid' => 'account-created',

Follow-up revisions

RevisionCommit summaryAuthorDate
r1122701.19wmf1: MFT r112267catrope23:21, 23 February 2012
r1122711.18wmf1: MFT r112267catrope23:23, 23 February 2012
r113054Followup r112267: make $wgCustomUserSignupTrackAccountCreations enable/disabl...catrope18:09, 5 March 2012

Status & tagging log