r98906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98905‎ | r98906 | r98907 >
Date:20:45, 4 October 2011
Author:awjrichards
Status:ok
Tags:
Comment:
MFT r98296
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialHideBanners.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialHideBanners.php
@@ -28,9 +28,16 @@
2929 readfile( dirname( __FILE__ ) . '/../1x1.png' );
3030 }
3131
 32+ /**
 33+ * Set the cookie for hiding fundraising banners.
 34+ */
3235 function setHideCookie() {
33 - global $wgNoticeCookieDomain, $wgCookieSecure;
34 - $exp = time() + 86400 * 14; // Cookie expires after 2 weeks
 36+ global $wgNoticeCookieDomain, $wgCookieSecure, $wgNoticeHideBannersExpiration;
 37+ if ( is_numeric( $wgNoticeHideBannersExpiration ) ) {
 38+ $exp = $wgNoticeHideBannersExpiration;
 39+ } else {
 40+ $exp = time() + 86400 * 14; // Cookie expires after 2 weeks
 41+ }
3542 if ( is_callable( array( 'CentralAuthUser', 'getCookieDomain' ) ) ) {
3643 $cookieDomain = CentralAuthUser::getCookieDomain();
3744 } else {
Property changes on: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialHideBanners.php
___________________________________________________________________
Modified: svn:mergeinfo
3845 Merged /trunk/extensions/CentralNotice/special/SpecialHideBanners.php:r98296

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98296allow people to set expiration date for Special:HideBannerskaldari01:05, 28 September 2011

Status & tagging log