r80149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80148‎ | r80149 | r80150 >
Date:01:19, 13 January 2011
Author:tomasz
Status:deferred
Tags:
Comment:
Merge up to head of trunk from r80146
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialHideBanners.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
@@ -64,6 +64,10 @@
6565 // This setting is currently shared with CentralAuth extension.
6666 $wgCentralAuthCookieDomain = '';
6767
 68+// Enable HideBanners Special Page
 69+// Set to true on wikis with donation thank you pages.
 70+$wgAllowHideBanners = false;
 71+
6872 $wgExtensionFunctions[] = 'efCentralNoticeSetup';
6973
7074 $wgExtensionCredits['other'][] = array(
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialHideBanners.php
@@ -5,7 +5,7 @@
66 }
77
88 /**
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.
1010 */
1111 class SpecialHideBanners extends UnlistedSpecialPage {
1212 function __construct() {
@@ -13,17 +13,19 @@
1414 }
1515
1616 function execute( $par ) {
17 - global $wgRequest, $wgOut;
 17+ global $wgAllowHideBanners, $wgRequest, $wgOut;
1818
19 - $this->setHideCookie();
 19+ if ( $wgAllowHideBanners ) {
 20+ $this->setHideCookie();
2021
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+ }
2830 }
2931
3032 function setHideCookie() {
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
3133 Merged /trunk/extensions/CentralNotice:r80147-80148

Follow-up revisions

RevisionCommit summaryAuthorDate
r80151Merge up to head of trunk from r80149tomasz01:38, 13 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80146Merge up to head of trunk from r79782tomasz01:00, 13 January 2011

Status & tagging log