Index: trunk/extensions/DonationInterface/payflowpro_gateway/includes/1x1.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/DonationInterface/payflowpro_gateway/includes/1x1.png |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 1 | + application/octet-stream |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/SpecialHideBanners.php |
— | — | @@ -0,0 +1,36 @@ |
| 2 | +<?php |
| 3 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 4 | + die( 'DonationInterface' ); |
| 5 | +} |
| 6 | + |
| 7 | +/** |
| 8 | + * Unlisted Special page to set cookies for hiding banners across all wikis. |
| 9 | + * |
| 10 | + * @ingroup Extensions |
| 11 | + */ |
| 12 | +class SpecialHideBanners extends UnlistedSpecialPage { |
| 13 | + function __construct() { |
| 14 | + parent::__construct( 'HideBanners' ); |
| 15 | + } |
| 16 | + |
| 17 | + function execute( $par ) { |
| 18 | + global $wgRequest, $wgOut; |
| 19 | + |
| 20 | + $this->setGlobalCookies(); |
| 21 | + |
| 22 | + $wgOut->disable(); |
| 23 | + |
| 24 | + wfResetOutputBuffers(); |
| 25 | + //header( "Content-type: text/html; charset=utf-8" ); |
| 26 | + header( 'Content-Type: image/png' ); |
| 27 | + header( 'Cache-Control: no-cache' ); |
| 28 | + |
| 29 | + readfile( dirname( __FILE__ ) . '/includes/1x1.png' ); |
| 30 | + } |
| 31 | + |
| 32 | + function setGlobalCookies() { |
| 33 | + global $wgRequest; |
| 34 | + $exp = time() + 86400 * 14; // 2 weeks |
| 35 | + setcookie( 'hidesnmessage', '0', $exp, '/' ); |
| 36 | + } |
| 37 | +} |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php |
— | — | @@ -45,6 +45,8 @@ |
46 | 46 | $wgExtensionMessagesFiles['PayflowProGatewayUSStates'] = $dir . 'payflowpro_gateway.us-states.i18n.php'; |
47 | 47 | $wgExtensionAliasesFiles['PayflowProGateway'] = $dir . 'payflowpro_gateway.alias.php'; |
48 | 48 | $wgSpecialPages['PayflowProGateway'] = 'PayflowProGateway'; |
| 49 | +$wgSpecialPages['HideBanners'] = 'SpecialHideBanners'; |
| 50 | +$wgAutoloadClasses['SpecialHideBanners'] = $dir . 'SpecialHideBanners.php'; |
49 | 51 | $wgAjaxExportList[] = "fnPayflowProofofWork"; |
50 | 52 | |
51 | 53 | |