Index: branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php |
— | — | @@ -530,14 +530,16 @@ |
531 | 531 | * are backwards (they are really opt-in) relative to contribution_tracking |
532 | 532 | * (which is opt-out), we need to reverse the values |
533 | 533 | */ |
534 | | - function setNormalizedOptOuts() { |
| 534 | + function setNormalizedOptOuts( $prune = false ) { |
535 | 535 | $optout['optout'] = ( $this->isSomething( 'email-opt' ) && $this->getVal( 'email-opt' ) == "1" ) ? '0' : '1'; |
536 | 536 | $optout['anonymous'] = ( $this->isSomething( 'comment-option' ) && $this->getVal( 'comment-option' ) == "1" ) ? '0' : '1'; |
537 | 537 | foreach ( $optout as $thing => $stuff ) { |
538 | 538 | $this->setVal( $thing, $stuff ); |
539 | 539 | } |
540 | | - $this->expunge( 'email-opt' ); |
541 | | - $this->expunge( 'comment-option' ); |
| 540 | + if ( $prune ) { |
| 541 | + $this->expunge( 'email-opt' ); |
| 542 | + $this->expunge( 'comment-option' ); |
| 543 | + } |
542 | 544 | } |
543 | 545 | |
544 | 546 | /** |