Index: branches/5.2.x/units/affiliates/affiliates_event_handler.php =================================================================== diff -u -N -r13845 -r14099 --- branches/5.2.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 13845) +++ branches/5.2.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 14099) @@ -1,6 +1,6 @@ Application->GetVar('AgreeToAffiliateTerms') ) { $this->Application->SetVar('MustAgreeToTerms', 1); - $event->MasterEvent->status = erFATAL; + $event->MasterEvent->status = kEvent::erFATAL; } if($require_affiliate && !$this->Application->GetVar('SSN') ) { $this->Application->SetVar('SSNRequiredError', 1); - $event->MasterEvent->status = erFATAL; + $event->MasterEvent->status = kEvent::erFATAL; } - if( ($event->MasterEvent->status == erFATAL) && $items_info ) $user_object->Validate(); + if( ($event->MasterEvent->status == kEvent::erFATAL) && $items_info ) $user_object->Validate(); } /** @@ -245,7 +245,7 @@ */ function OnRegisterAsAffiliate(&$event) { - if($this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != erSUCCESS) + if($this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != kEvent::erSUCCESS) { return; } @@ -272,14 +272,14 @@ if(!$this->Application->GetVar('AgreeToAffiliateTerms')) { $this->Application->SetVar('MustAgreeToTerms', 1); - $event->status = erFATAL; + $event->status = kEvent::erFATAL; } if(!$this->Application->GetVar('SSN')) { $this->Application->SetVar('SSNRequiredError', 1); - $event->status = erFATAL; + $event->status = kEvent::erFATAL; } - if($event->status == erFATAL) + if($event->status == kEvent::erFATAL) { return; } @@ -318,7 +318,7 @@ $email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.PAYMENT.TYPE.CHANGED'); $event->redirect = $this->Application->GetVar('next_template'); - $event->status = erSUCCESS; + $event->status = kEvent::erSUCCESS; } /** @@ -392,7 +392,7 @@ if ($affiliate_ids && defined('DEBUG_MODE') && DEBUG_MODE && $this->Application->isDebugMode()) { $this->Application->Debugger->appendHTML('Affiliates Pending Totals Reset: '); - print_pre($affiliate_ids); + $this->Application->Debugger->dumpVars($affiliate_ids); } $sql = 'UPDATE '.$affil_table.' SET AccumulatedAmount = 0, ItemsSold = 0, LastOrderDate = %s WHERE AffiliateId IN (%s)'; @@ -452,7 +452,7 @@ function iterateItems(&$event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { - $event->status = erFAIL; + $event->status = kEvent::erFAIL; return; } @@ -499,12 +499,12 @@ $email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.DENIED'); break; } - $event->status=erSUCCESS; - $event->redirect_params = Array('opener' => 's'); //stay! + $event->status=kEvent::erSUCCESS; + $event->setRedirectParams(Array('opener' => 's'), true); //stay! } else { - $event->status=erFAIL; + $event->status=kEvent::erFAIL; $event->redirect=false; break; }