https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112267
Revision: 112267
Author: catrope
Date: 2012-02-23 23:19:44 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Allow disabling of the ClickTracking invocation in CustomUserSignup, and
disable it by default
Modified Paths:
--------------
trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php
trunk/extensions/CustomUserSignup/CustomUserSignup.php
Modified: trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php
===================================================================
--- trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php
2012-02-23 23:17:28 UTC (rev 112266)
+++ trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php
2012-02-23 23:19:44 UTC (rev 112267)
@@ -116,7 +116,7 @@
}
public static function addNewAccount( $user, $byEmail ){
- global $wgRequest, $wgTitle;
+ global $wgRequest, $wgTitle,
$wgCustomUserSignupTrackAccountCreations;
$buckets = ClickTrackingHooks::unpackBucketInfo();
if(isset($buckets['AccountCreation']) &&
$buckets['AccountCreation'][0] != "none"){
@@ -126,7 +126,7 @@
time() + 60 * 60 * 24 * 365 , '/' );
$session = $wgRequest->getCookie(
'clicktracking-session', "" );
- if ( $session !== null ) {
+ if ( $session !== null &&
$wgCustomUserSignupTrackAccountCreations ) {
$params = new FauxRequest( array(
'action' => 'clicktracking',
'eventid' => 'account-created',
Modified: trunk/extensions/CustomUserSignup/CustomUserSignup.php
===================================================================
--- trunk/extensions/CustomUserSignup/CustomUserSignup.php 2012-02-23
23:17:28 UTC (rev 112266)
+++ trunk/extensions/CustomUserSignup/CustomUserSignup.php 2012-02-23
23:19:44 UTC (rev 112267)
@@ -44,6 +44,8 @@
$wgCustomUserSignupVersion = 1;
$wgCustomUserSignupSetBuckets = true;
+// If true, log each account creation to ClickTracking
+$wgCustomUserSignupTrackAccountCreations = false;
// For Account Creation Project
if ( class_exists( 'ClickTrackingHooks' ) ) {
ClickTrackingHooks::addCampaign($dir. 'modules',
'CustomUserSignup/modules', 'AccountCreationUserBucket' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs