http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97833

Revision: 97833
Author:   khorn
Date:     2011-09-22 18:37:59 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Card #282 - tiny bug fix.

Modified Paths:
--------------
    
branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php
   2011-09-22 18:09:07 UTC (rev 97832)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php
   2011-09-22 18:37:59 UTC (rev 97833)
@@ -530,14 +530,16 @@
         * are backwards (they are really opt-in) relative to 
contribution_tracking
         * (which is opt-out), we need to reverse the values
         */
-       function setNormalizedOptOuts() {
+       function setNormalizedOptOuts( $prune = false ) {
                $optout['optout'] = ( $this->isSomething( 'email-opt' ) && 
$this->getVal( 'email-opt' ) == "1" ) ? '0' : '1';
                $optout['anonymous'] = ( $this->isSomething( 'comment-option' ) 
&& $this->getVal( 'comment-option' ) == "1" ) ? '0' : '1';
                foreach ( $optout as $thing => $stuff ) {
                        $this->setVal( $thing, $stuff );
                }
-               $this->expunge( 'email-opt' );
-               $this->expunge( 'comment-option' );
+               if ( $prune ) {
+                       $this->expunge( 'email-opt' );
+                       $this->expunge( 'comment-option' );
+               }
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to