r102835 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102834‎ | r102835 | r102836 >
Date:01:01, 12 November 2011
Author:kaldari
Status:ok
Tags:
Comment:
follow-up to r102832 - more readable
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -1553,14 +1553,17 @@
15541554 if ( isset( $this->dataConstraints[ $field ] ) && is_string( $value ) ) {
15551555
15561556 // Truncate the field if it has a length specified
1557 - $length = isset( $this->dataConstraints[ $field ]['length']) ? (integer) $this->dataConstraints[ $field ]['length'] : false;
 1557+ if ( isset( $this->dataConstraints[ $field ]['length'] ) ) {
 1558+ $length = (integer) $this->dataConstraints[ $field ]['length'];
 1559+ } else {
 1560+ $length = false;
 1561+ }
15581562
15591563 if ( !empty( $length ) && !empty( $value ) ) {
15601564 $value = substr( $value, 0, $length );
15611565 }
1562 - }
1563 - else {
1564 -
 1566+
 1567+ } else {
15651568 $this->log( 'Field does not exist in $this->dataConstraints[ ' . ( string ) $field . ' ]', LOG_DEBUG );
15661569 }
15671570

Follow-up revisions

RevisionCommit summaryAuthorDate
r102929Re-attempting MFT r102576, r102577, r102578, r102579, r102581, r102689, r1027...khorn00:50, 14 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102832Added variable $this->dataConstraints. Added method $this->formatStagedData()...jpostlethwaite00:43, 12 November 2011

Status & tagging log