Index: branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php =================================================================== diff -u -N -r14655 -r14986 --- branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php (.../affiliate_payments_event_handler.php) (revision 14655) +++ branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php (.../affiliate_payments_event_handler.php) (revision 14986) @@ -1,6 +1,6 @@ Special == 'log' ) { return ; @@ -103,28 +103,29 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(&$event) + protected function SetCustomQuery(kEvent &$event) { + parent::SetCustomQuery($event); + $object =& $event->getObject(); - if($event->Special == 'log') - { + /* @var $object kDBList */ + + if ( $event->Special == 'log' ) { $object->removeFilter('parent_filter'); } $types = $event->getEventParam('types'); - if ($types=='my_payments') - { + if ( $types == 'my_payments' ) { $user_id = $this->Application->RecallVar('user_id'); $object->removeFilter('parent_filter'); - $object->addFilter('my_payments', 'au.PortalUserId = '.$user_id); + $object->addFilter('my_payments', 'au.PortalUserId = ' . $user_id); } - if ($types=='myvisitororders') - { + if ( $types == 'myvisitororders' ) { $user_id = $this->Application->RecallVar('user_id'); - $object->addFilter('myitems_orders','ord.OrderId IS NOT NULL'); - $object->addFilter('myitems_user1','au.PortalUserId = '.$user_id); - $object->addFilter('myitems_user2','au.PortalUserId > 0'); + $object->addFilter('myitems_orders', 'ord.OrderId IS NOT NULL'); + $object->addFilter('myitems_user1', 'au.PortalUserId = ' . $user_id); + $object->addFilter('myitems_user2', 'au.PortalUserId > 0'); } }