Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -64,6 +64,10 @@ |
65 | 65 | // This setting is currently shared with CentralAuth extension. |
66 | 66 | $wgCentralAuthCookieDomain = ''; |
67 | 67 | |
| 68 | +// Enable HideBanners Special Page |
| 69 | +// Set to true on wikis with donation thank you pages. |
| 70 | +$wgAllowHideBanners = false; |
| 71 | + |
68 | 72 | $wgExtensionFunctions[] = 'efCentralNoticeSetup'; |
69 | 73 | |
70 | 74 | $wgExtensionCredits['other'][] = array( |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialHideBanners.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | } |
7 | 7 | |
8 | 8 | /** |
9 | | - * Unlisted Special page to set cookies for hiding banners across all wikis. |
| 9 | + * Unlisted Special Page to set cookies for hiding banners across all wikis. |
10 | 10 | */ |
11 | 11 | class SpecialHideBanners extends UnlistedSpecialPage { |
12 | 12 | function __construct() { |
— | — | @@ -13,17 +13,19 @@ |
14 | 14 | } |
15 | 15 | |
16 | 16 | function execute( $par ) { |
17 | | - global $wgRequest, $wgOut; |
| 17 | + global $wgAllowHideBanners, $wgRequest, $wgOut; |
18 | 18 | |
19 | | - $this->setHideCookie(); |
| 19 | + if ( $wgAllowHideBanners ) { |
| 20 | + $this->setHideCookie(); |
20 | 21 | |
21 | | - $wgOut->disable(); |
22 | | - wfResetOutputBuffers(); |
23 | | - |
24 | | - header( 'Content-Type: image/png' ); |
25 | | - header( 'Cache-Control: no-cache' ); |
26 | | - |
27 | | - readfile( dirname( __FILE__ ) . '/1x1.png' ); |
| 22 | + $wgOut->disable(); |
| 23 | + wfResetOutputBuffers(); |
| 24 | + |
| 25 | + header( 'Content-Type: image/png' ); |
| 26 | + header( 'Cache-Control: no-cache' ); |
| 27 | + |
| 28 | + readfile( dirname( __FILE__ ) . '/1x1.png' ); |
| 29 | + } |
28 | 30 | } |
29 | 31 | |
30 | 32 | function setHideCookie() { |
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice |
___________________________________________________________________ |
Modified: svn:mergeinfo |
31 | 33 | Merged /trunk/extensions/CentralNotice:r80147-80148 |