r112175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112174‎ | r112175 | r112176 >
Date:01:11, 23 February 2012
Author:pgehres
Status:ok
Tags:
Comment:
A few little changes for khorn. FU r112171
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/DataValidator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/DataValidator.php
@@ -238,6 +238,7 @@
239239 * @return boolean - true if message exists, otherwise false.
240240 */
241241 public static function wmfMessageExists( $msg_key, $language ){
 242+ $language = strtolower( $language );
242243 if ( wfMessage( $msg_key )->inLanguage( $language )->exists() ){
243244 # if we are looking for English, we already know the answer
244245 if ( $language == 'en' ){
@@ -264,9 +265,7 @@
265266 * @return String the text of the first existant message
266267 * @throws MWException if no message keys are specified
267268 */
268 - public static function wfLangSpecificFallback( $language /*...*/ ){
269 - $msg_keys = func_get_args();
270 - array_shift( $msg_keys );
 269+ public static function wfLangSpecificFallback( $language='en', $msg_keys=array() ){
271270
272271 if ( count( $msg_keys ) < 1 ){
273272 throw new MWException( __FUNCTION__ . " BAD PROGRAMMER. No message keys given." );

Follow-up revisions

RevisionCommit summaryAuthorDate
r112177Updating RapidHTML after r112175 and r112171. Partial revert of r111992pgehres01:22, 23 February 2012
r112245New DataValidator class, and donationinterface.php Only: MFT r107299, r10755...khorn21:42, 23 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112171Updating wmfMessageExists to actully do what we want. Adding wfLangSpecificF...pgehres00:41, 23 February 2012

Status & tagging log