r102469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102468‎ | r102469 | r102470 >
Date:00:00, 9 November 2011
Author:jpostlethwaite
Status:ok
Tags:fundraising 
Comment:
Simplfying method getTransactionDataLanguage(). See r101956.
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -1676,34 +1676,7 @@
16771677 */
16781678 public function getTransactionDataLanguage() {
16791679
1680 - $data = $this->getTransactionData();
1681 -
1682 - $return = false;
1683 -
1684 - // Check for language in $data
1685 - if ( is_array( $data ) ) {
1686 - if ( array_key_exists( 'language', $data ) ) {
1687 - $return = $data['language'];
1688 - }
1689 - }
1690 -
1691 - // Check for language in $data['ORDER']['LANGUAGECODE']
1692 - if ( empty( $return ) && array_key_exists( 'ORDER', $data ) ) {
1693 -
1694 - if ( array_key_exists( 'LANGUAGECODE', $data['ORDER'] ) ) {
1695 - $return = $data['ORDER']['LANGUAGECODE'];
1696 - }
1697 - }
1698 -
1699 - // Check for language in $data['PAYMENT']['LANGUAGECODE']
1700 - if ( empty( $return ) && array_key_exists( 'PAYMENT', $data ) ) {
1701 -
1702 - if ( array_key_exists( 'LANGUAGECODE', $data['PAYMENT'] ) ) {
1703 - $return = $data['PAYMENT']['LANGUAGECODE'];
1704 - }
1705 - }
1706 -
1707 - return $return;
 1680+ return $this->getData_Raw( 'language' );
17081681 }
17091682
17101683 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101956Added $error_map, getErrorMap(), getErrorMapByCodeAndTranslate(), getTransact...jpostlethwaite05:18, 4 November 2011

Status & tagging log