r100659 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100658‎ | r100659 | r100660 >
Date:22:49, 24 October 2011
Author:awjrichards
Status:ok
Tags:fundraising 
Comment:
Added the ability to enable DonationInterface in such a way to only expose i18n messages and no other functionality; as well as a corresponding descriptive message
Modified paths:
  • /trunk/extensions/DonationInterface/donationinterface_langonly.php (added) (history)
  • /trunk/extensions/DonationInterface/gateway_common/interface.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donationinterface_langonly.php
@@ -0,0 +1,40 @@
 2+<?php
 3+/**
 4+ * Donation Interface - Lang only
 5+ *
 6+ * When installed, this will *ONLY* load i18n messages from DonationInterface. This
 7+ * will not expose any other DonationInterface functionality.
 8+ *
 9+ * To install the DontaionInterface extension, put the following line in LocalSettings.php:
 10+ * require_once( "\$IP/extensions/DonationInterface/donationinterface_langonly.php" );
 11+ *
 12+ */
 13+
 14+# Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
 15+if ( !defined( 'MEDIAWIKI' ) ) {
 16+ echo <<<EOT
 17+To install the DontaionInterface lang only extension, put the following line in LocalSettings.php:
 18+require_once( "\$IP/extensions/DonationInterface/donationinterface_langonly.php" );
 19+EOT;
 20+ exit( 1 );
 21+}
 22+
 23+// Extension credits that will show up on Special:Version
 24+$wgExtensionCredits['specialpage'][] = array(
 25+ 'name' => 'Donation Interface - Language Only',
 26+ 'author' => array( 'Katie Horn', 'Ryan Kaldari' , 'Arthur Richards', 'Jeremy Postlethwaite' ),
 27+ 'version' => '2.0.0',
 28+ 'descriptionmsg' => 'donate_interface-langonly-desc',
 29+ 'url' => 'http://www.mediawiki.org/wiki/Extension:DonationInterface',
 30+);
 31+
 32+$donationinterface_dir = dirname( __FILE__ ) . '/';
 33+
 34+// Load the interface messages that are shared across all gateways
 35+$wgExtensionMessagesFiles['DonateInterface'] = $donationinterface_dir . 'gateway_common/interface.i18n.php';
 36+$wgExtensionMessagesFiles['GatewayCountries'] = $donationinterface_dir . 'gateway_common/countries.i18n.php';
 37+$wgExtensionMessagesFiles['GatewayUSStates'] = $donationinterface_dir . 'gateway_common/us-states.i18n.php';
 38+
 39+// PayflowPro-specific messaging
 40+$wgExtensionMessagesFiles['PayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.i18n.php';
 41+$wgExtensionAliasesFiles['PayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.alias.php';
\ No newline at end of file
Property changes on: trunk/extensions/DonationInterface/donationinterface_langonly.php
___________________________________________________________________
Added: svn:eol-style
142 + native
Index: trunk/extensions/DonationInterface/gateway_common/interface.i18n.php
@@ -11,7 +11,8 @@
1212 /** English */
1313 $messages['en'] = array(
1414 'donate_interface' => 'Support Wikimedia',
15 - 'donate_interface-desc' => 'Donation landing page that integrates gateway extensions',
 15+ 'donate_interface-desc' => 'Donation landing page that integrates gateway extensions.',
 16+ 'donate_interface-langonly-desc' => 'Exposes ONLY DonationInterface i18n messages.',
1617 'donate_interface-intro' => 'Please choose a payment method, amount, and currency.',
1718 'donate_interface-amount' => 'Donation amount:',
1819 'donate_interface-other-amount' => 'Other amount',

Status & tagging log