r86999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86998‎ | r86999 | r87000 >
Date:00:50, 27 April 2011
Author:nimishg
Status:ok
Tags:
Comment:
changing cookie expiry to 90 days as per request, will be backported to trunk later
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/ClickTracking/ClickTracking.hooks.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ClickTracking/modules/ext.UserBuckets.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/ClickTracking/ClickTracking.hooks.php
@@ -166,7 +166,7 @@
167167
168168 //NOTE: $wgRequest->response setCookie sets it with a prefix and httponly by default
169169 setcookie( 'userbuckets' , $packedBuckets ,
170 - time() + 60 * 60 * 24 * 365 ); //expire in 1 year
 170+ time() + 60 * 60 * 24 * 90 ); //expires in 90 days
171171 }
172172
173173 /**
Index: branches/wmf/1.17wmf1/extensions/ClickTracking/modules/ext.UserBuckets.js
@@ -42,7 +42,7 @@
4343 var bucketCookies = $.getBuckets();
4444 if(!bucketCookies) { bucketCookies ={};}
4545 bucketCookies[ bucketName ] = [ bucketValue, bucketVersion ];
46 - $j.cookie('userbuckets', JSON.stringify( bucketCookies ) , { expires: 365 }); //expires in 1 year
 46+ $j.cookie('userbuckets', JSON.stringify( bucketCookies ) , { expires: 90 }); //expires in 90 days
4747 bucketCookies = $.getBuckets(true); //force it to rerun and update
4848 };
4949

Status & tagging log