r97833 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97832‎ | r97833 | r97834 >
Date:18:37, 22 September 2011
Author:khorn
Status:ok (Comments)
Tags:fundraising 
Comment:
Card #282 - tiny bug fix.
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php
@@ -530,14 +530,16 @@
531531 * are backwards (they are really opt-in) relative to contribution_tracking
532532 * (which is opt-out), we need to reverse the values
533533 */
534 - function setNormalizedOptOuts() {
 534+ function setNormalizedOptOuts( $prune = false ) {
535535 $optout['optout'] = ( $this->isSomething( 'email-opt' ) && $this->getVal( 'email-opt' ) == "1" ) ? '0' : '1';
536536 $optout['anonymous'] = ( $this->isSomething( 'comment-option' ) && $this->getVal( 'comment-option' ) == "1" ) ? '0' : '1';
537537 foreach ( $optout as $thing => $stuff ) {
538538 $this->setVal( $thing, $stuff );
539539 }
540 - $this->expunge( 'email-opt' );
541 - $this->expunge( 'comment-option' );
 540+ if ( $prune ) {
 541+ $this->expunge( 'email-opt' );
 542+ $this->expunge( 'comment-option' );
 543+ }
542544 }
543545
544546 /**

Comments

#Comment by Khorn (WMF) (talk | contribs)   18:42, 23 September 2011

Please note that this branch is in the middle of a serious refactoring, and is by no means ready to be merged back into trunk. (Latest DonationInterface branch rev at the time of this comment is r97833.)

Status & tagging log