Index: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialHideBanners.php |
— | — | @@ -28,9 +28,16 @@ |
29 | 29 | readfile( dirname( __FILE__ ) . '/../1x1.png' ); |
30 | 30 | } |
31 | 31 | |
| 32 | + /** |
| 33 | + * Set the cookie for hiding fundraising banners. |
| 34 | + */ |
32 | 35 | 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 | + } |
35 | 42 | if ( is_callable( array( 'CentralAuthUser', 'getCookieDomain' ) ) ) { |
36 | 43 | $cookieDomain = CentralAuthUser::getCookieDomain(); |
37 | 44 | } else { |
Property changes on: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialHideBanners.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
38 | 45 | Merged /trunk/extensions/CentralNotice/special/SpecialHideBanners.php:r98296 |