Index: branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 15061) +++ branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); if ($object->IsTempTable()) { @@ -74,7 +74,7 @@ return explode(',', $this->Conn->GetOne($query)); } - function CreateCombinations(&$event, $fields, $current_option=null) + function CreateCombinations($event, $fields, $current_option=null) { $recursed = false; $combination = $fields['Combination']; @@ -117,7 +117,7 @@ } } - function UpdateCombinations(&$event, $fields, $current_option=null) + function UpdateCombinations($event, $fields, $current_option=null) { $recursed = false; $combination = $fields['Combination']; @@ -164,7 +164,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -196,7 +196,7 @@ * @return void * @access protected */ - protected function OnUpdate(kEvent &$event) + protected function OnUpdate(kEvent $event) { $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object kDBItem */ @@ -241,7 +241,7 @@ * @param kEvent $event * @access protected */ - protected function OnItemBuild(kEvent &$event) + protected function OnItemBuild(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -274,7 +274,7 @@ * @return void * @access protected */ - protected function LoadItem(kEvent &$event) + protected function LoadItem(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -302,7 +302,7 @@ * @return string * @access protected */ - protected function getMainSpecial(kEvent &$event) + protected function getMainSpecial(kEvent $event) { $special = $event->getEventParam('main_special'); @@ -325,7 +325,7 @@ * @return void * @access protected */ - protected function OnBeforeClone(kEvent &$event) + protected function OnBeforeClone(kEvent $event) { parent::OnBeforeClone($event); @@ -363,7 +363,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -405,7 +405,7 @@ * @return void * @access protected */ - protected function OnSearch(kEvent &$event) + protected function OnSearch(kEvent $event) { parent::OnSearch($event); @@ -419,7 +419,7 @@ * @return void * @access protected */ - protected function OnSearchReset(kEvent &$event) + protected function OnSearchReset(kEvent $event) { parent::OnSearchReset($event); @@ -431,7 +431,7 @@ * * @param kEvent $event */ - function _saveProduct(&$event) + function _saveProduct($event) { $product_id = $this->Application->GetVar('p_id'); Index: branches/5.2.x/units/discount_items/discount_items_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/discount_items/discount_items_event_handler.php (.../discount_items_event_handler.php) (revision 15061) +++ branches/5.2.x/units/discount_items/discount_items_event_handler.php (.../discount_items_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject( Array('skip_autoload' => true) ); $selected_ids = $this->Application->GetVar('selected_ids'); @@ -102,7 +102,7 @@ * @todo get parent item id through $object->getLinkedInfo()['ParentId'] * @access public */ - function OnEntireOrder(&$event) + function OnEntireOrder($event) { $object =& $event->GetObject(); $sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id'); @@ -129,7 +129,7 @@ * * @param kEvent $event */ - function OnDeleteDiscountedItem(&$event) + function OnDeleteDiscountedItem($event) { $main_object =& $event->MasterEvent->getObject(); $resource_id = $main_object->GetDBField('ResourceId'); @@ -146,7 +146,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (.../affiliate_plans_brackets_event_handler.php) (revision 15061) +++ branches/5.2.x/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (.../affiliate_plans_brackets_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ redirect = false; @@ -54,7 +54,7 @@ * * @param kEvent $event */ - function OnArrange(&$event) + function OnArrange($event) { $event->redirect = false; $brackets_helper =& $this->Application->recallObject('BracketsHelper'); @@ -69,7 +69,7 @@ * * @param kEvent $event */ - function OnInfinity(&$event) + function OnInfinity($event) { $event->redirect = false; $brackets_helper =& $this->Application->recallObject('BracketsHelper'); @@ -90,7 +90,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -112,7 +112,7 @@ * * @param kEvent $event */ - function OnPreSaveBrackets(&$event) + function OnPreSaveBrackets($event) { $brackets_helper =& $this->Application->recallObject('BracketsHelper'); /* @var $brackets_helper kBracketsHelper */ Index: branches/5.2.x/units/products/products_event_handler.php =================================================================== diff -u -N -r15072 -r15134 --- branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15072) +++ branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ @@ -224,7 +224,7 @@ $this->modifyInventory($action, $product, $qty, $combination_id); } - function RunScheduledInventoryActions(&$event) + function RunScheduledInventoryActions($event) { $inv_actions = $this->Application->GetVar('inventory_actions'); if (!$inv_actions) { @@ -315,7 +315,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -348,7 +348,7 @@ * @return void * @access protected */ - protected function clearSelectedIDs(kEvent &$event) + protected function clearSelectedIDs(kEvent $event) { parent::clearSelectedIDs($event); @@ -364,7 +364,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { parent::OnSave($event); @@ -382,7 +382,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::onPreCreate($event); @@ -401,7 +401,7 @@ * @return void * @access protected */ - protected function OnPreSaveAndGo(kEvent &$event) + protected function OnPreSaveAndGo(kEvent $event) { $event->CallSubEvent('OnPreSave'); $this->LoadItem($event); @@ -494,7 +494,7 @@ * @param kEvent $event * @return Array */ - function getTypeClauses(&$event) + function getTypeClauses($event) { $types = $event->getEventParam('types'); $types = $types ? explode(',', $types) : Array (); @@ -668,7 +668,7 @@ return $type_clauses; } - function OnClearRecent(&$event) + function OnClearRecent($event) { $this->Application->RemoveVar('recent_products'); } @@ -678,7 +678,7 @@ * * @param kEvent $event */ - function OnRateProduct(&$event) + function OnRateProduct($event) { $event->SetRedirectParam('pass', 'all,p'); $event->redirect = $this->Application->GetVar('success_template'); @@ -739,7 +739,7 @@ * * @param kEvent $event */ - function OnCancelAction(&$event) + function OnCancelAction($event) { $event->SetRedirectParam('pass', 'all,p'); $event->redirect = $this->Application->GetVar('cancel_template'); @@ -750,7 +750,7 @@ * * @param kEvent $event */ - function OnRecommendProduct(&$event) + function OnRecommendProduct($event) { // used for error reporting only -> rewrite code + theme (by Alex) $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too @@ -797,7 +797,7 @@ * * @param kEvent $event */ - function OnSaveVirtualProduct(&$event) + function OnSaveVirtualProduct($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true)); @@ -861,7 +861,7 @@ * * @param kEvent $event */ - function OnDeleteListingType(&$event) + function OnDeleteListingType($event) { $listing_type =& $event->MasterEvent->getObject(); /* @var $listing_type kDBItem */ @@ -879,7 +879,7 @@ * * @param kEvent $event */ - function OnSubscriptionApprove(&$event) + function OnSubscriptionApprove($event) { $field_values = $event->getEventParam('field_values'); $item_data = unserialize($field_values['ItemData']); @@ -932,7 +932,7 @@ $sub_order->SetDBField('NextCharge_time', $expire); } - function OnDownloadableApprove(&$event) + function OnDownloadableApprove($event) { $field_values = $event->getEventParam('field_values'); $product_id = $field_values['ProductId']; @@ -943,7 +943,7 @@ $this->Conn->Query($sql); } - function OnPackageApprove(&$event){ + function OnPackageApprove($event){ $field_values = $event->getEventParam('field_values'); $item_data = unserialize($field_values['ItemData']); $package_content_ids = $item_data['PackageContent']; @@ -986,7 +986,7 @@ * @return void * @access protected */ - protected function OnPreSave(kEvent &$event) + protected function OnPreSave(kEvent $event) { $this->CheckRequiredOptions($event); @@ -1000,7 +1000,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -1014,7 +1014,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -1026,7 +1026,7 @@ * * @param kEvent $event */ - function _updateProductPrice(&$event) + function _updateProductPrice($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -1042,7 +1042,7 @@ } } - function CheckRequiredOptions(&$event) + function CheckRequiredOptions($event) { $object =& $event->getObject(); if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created @@ -1103,7 +1103,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -1130,7 +1130,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -1160,7 +1160,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $dst_field = $this->Application->RecallVar('dst_field'); @@ -1185,7 +1185,7 @@ * * @param kEvent $event */ - function OnAddToPackage(&$event) + function OnAddToPackage($event) { $selected_ids = $this->Application->GetVar('selected_ids'); @@ -1217,7 +1217,7 @@ } - function ProcessPackageItems(&$event) + function ProcessPackageItems($event) { //$this->Application->SetVar('p_mode', 't'); @@ -1271,7 +1271,7 @@ * @param kEvent $event */ - function OnSaveItems(&$event) + function OnSaveItems($event) { //$event->CallSubEvent('OnUpdate'); $event->redirect = false; @@ -1283,7 +1283,7 @@ * * @param kEvent $event */ - function OnRemovePackageItem(&$event) { + function OnRemovePackageItem($event) { $this->Application->SetVar('p_mode', 't'); @@ -1318,7 +1318,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -1342,7 +1342,7 @@ * @return Array * @access protected */ - public function getCustomExportColumns(kEvent &$event) + public function getCustomExportColumns(kEvent $event) { $columns = parent::getCustomExportColumns($event); @@ -1359,7 +1359,7 @@ * * @param kEvent $event */ - function setCustomExportColumns(&$event) + function setCustomExportColumns($event) { parent::setCustomExportColumns($event); @@ -1369,7 +1369,7 @@ $this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array ('Cost' => (double)$object->GetDBField('Cost'))); } - function OnPreSaveAndOpenPopup(&$event) + function OnPreSaveAndOpenPopup($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -1395,7 +1395,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( $this->Application->isAdminUser ) { $event->setEventParam('raise_warnings', 0); @@ -1427,7 +1427,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -1464,7 +1464,7 @@ * @return void * @access protected */ - protected function OnEdit(kEvent &$event) + protected function OnEdit(kEvent $event) { $this->Application->RemoveVar('inventory_actions'); @@ -1476,7 +1476,7 @@ * * @param kEvent $event */ - function OnModifyPaidListingConfig(&$event) + function OnModifyPaidListingConfig($event) { $edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets'); $edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2); @@ -1490,7 +1490,7 @@ * @return void * @access protected */ - protected function OnCloneSubItem(kEvent &$event) + protected function OnCloneSubItem(kEvent $event) { parent::OnCloneSubItem($event); @@ -1516,7 +1516,7 @@ * @return void * @access protected */ - protected function OnAddToCompare(kEvent &$event) + protected function OnAddToCompare(kEvent $event) { $products = $this->getCompareProducts(); $product_id = (int)$this->Application->GetVar($event->Prefix . '_id'); @@ -1545,7 +1545,7 @@ * @return void * @access protected */ - protected function OnRemoveFromCompare(kEvent &$event) + protected function OnRemoveFromCompare(kEvent $event) { $products = $this->getCompareProducts(); @@ -1568,7 +1568,7 @@ * @return void * @access protected */ - protected function OnCancelCompare(kEvent &$event) + protected function OnCancelCompare(kEvent $event) { $this->Application->Session->SetCookie('compare_products', '', -1); Index: branches/5.2.x/units/affiliates/affiliates_event_handler.php =================================================================== diff -u -N -r15103 -r15134 --- branches/5.2.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 15103) +++ branches/5.2.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Name == 'OnBecomeAffiliate' || $event->Name == 'OnChangePaymentType' ) { return $this->Application->LoggedIn() && $this->Application->ConfigValue('Comm_RegisterAsAffiliate'); @@ -56,7 +56,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( $event->Special == 'user' ) { $event->setEventParam('raise_warnings', 0); @@ -80,7 +80,7 @@ * @param kEvent $event * @return string */ - function generateAffiliateCode(&$event) + function generateAffiliateCode($event) { // accepts 1 - 36 $number_length = 11; @@ -117,7 +117,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -142,7 +142,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -164,8 +164,12 @@ * @param kEvent $event * @return bool */ - function OnStoreAffiliate(&$event) + function OnStoreAffiliate($event) { + if ( defined('IS_INSTALL') && IS_INSTALL ) { + return; + } + $object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -219,7 +223,7 @@ * @param kEvent $event * @author Alex */ - function OnOrderApprove(&$event) + function OnOrderApprove($event) { $order =& $this->Application->recallObject($event->getEventParam('Order_PrefixSpecial')); /* @var $order OrdersItem */ @@ -299,7 +303,7 @@ * @return void * @access protected */ - protected function OnValidateAffiliate(&$event) + protected function OnValidateAffiliate($event) { if ( $this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != kEvent::erSUCCESS ) { return; @@ -327,7 +331,7 @@ * * @param kEvent $event */ - function OnRegisterAffiliate(&$event) + function OnRegisterAffiliate($event) { if ( $this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != kEvent::erSUCCESS ) { return; @@ -367,7 +371,7 @@ * * @param kEvent $event */ - function OnBecomeAffiliate(&$event) + function OnBecomeAffiliate($event) { $object =& $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) ); /* @var $object UsersItem */ @@ -392,7 +396,7 @@ * @return void * @access protected */ - protected function OnChangePaymentType(&$event) + protected function OnChangePaymentType($event) { $event->CallSubEvent('OnUpdate'); @@ -420,7 +424,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -474,7 +478,7 @@ * @param kEvent $event * @author Alex */ - function OnResetStatistics(&$event) + function OnResetStatistics($event) { if ( defined('IS_INSTALL') && IS_INSTALL ) { return; @@ -574,7 +578,7 @@ * @return void * @access protected */ - protected function iterateItems(kEvent &$event) + protected function iterateItems(kEvent $event) { if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; @@ -641,7 +645,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { if ( $this->Application->isAdminUser ) { return true; Index: branches/5.2.x/units/reports/reports_event_handler.php =================================================================== diff -u -N -r15047 -r15134 --- branches/5.2.x/units/reports/reports_event_handler.php (.../reports_event_handler.php) (revision 15047) +++ branches/5.2.x/units/reports/reports_event_handler.php (.../reports_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ permMapping = array_merge($this->permMapping, $permissions); } - function OnRunReport(&$event) + function OnRunReport($event) { $this->Application->LinkVar('reports_finish_t'); $progress_t = $this->Application->GetVar('progress_t'); @@ -330,7 +330,7 @@ $this->Application->StoreVar('report_options', serialize($field_values)); } - function OnUpdateConfig(&$event) + function OnUpdateConfig($event) { $report = $this->Application->RecallVar('report_options'); if (!$report) { @@ -645,12 +645,12 @@ return $a_ret; } - function OnChangeStatistics(&$event) + function OnChangeStatistics($event) { $this->Application->StoreVar('ChartMetric', $this->Application->GetVar('metric')); } - function OnPieChart(&$event) + function OnPieChart($event) { $ChartHelper =& $this->Application->RecallObject('ChartHelper'); @@ -689,7 +689,7 @@ * @param kEvent $event */ - function OnPrintChart(&$event) + function OnPrintChart($event) { $ChartHelper =& $this->Application->RecallObject('ChartHelper'); @@ -747,7 +747,7 @@ } - function OnExportReport(&$event) + function OnExportReport($event) { $report =& $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) ); /* @var $report kDBList*/ Index: branches/5.2.x/units/shipping/shipping_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/shipping/shipping_event_handler.php (.../shipping_event_handler.php) (revision 15061) +++ branches/5.2.x/units/shipping/shipping_event_handler.php (.../shipping_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->recallObject('sc'); /* @var $cost_object kDBItem */ @@ -143,7 +143,7 @@ $this->finalizePopup($event); } - function OnFlip(&$event) + function OnFlip($event) { $object =& $event->getObject(); $aligment = $this->Application->GetLinkedVar('CostsTableAligment'); @@ -164,7 +164,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { $this->OnAfterItemLoad($event); @@ -178,7 +178,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -192,7 +192,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -207,14 +207,14 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); $event->CallSubEvent('OnAnyChange'); } - function OnAnyChange(&$event) + function OnAnyChange($event) { $sql = 'DELETE FROM ' . TABLE_PREFIX . 'SystemCache WHERE VarName LIKE "ShippingQuotes%"'; @@ -229,7 +229,7 @@ * @return void * @access protected */ - protected function OnPreSaveCreated(kEvent &$event) + protected function OnPreSaveCreated(kEvent $event) { parent::OnPreSaveCreated($event); @@ -239,7 +239,7 @@ $object->SetDBField('PortalGroups', ',' . $this->Application->ConfigValue('User_LoggedInGroup') . ','); } - function UpdateGroups(&$event) + function UpdateGroups($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -267,7 +267,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { $this->UpdateGroups($event); } Index: branches/5.2.x/gw_notify.php =================================================================== diff -u -N -r14689 -r15134 --- branches/5.2.x/gw_notify.php (.../gw_notify.php) (revision 14689) +++ branches/5.2.x/gw_notify.php (.../gw_notify.php) (revision 15134) @@ -1,6 +1,6 @@ HandleEvent($dummy_var, 'ord:OnCompleteOrder'); + $application->HandleEvent(new kEvent('ord:OnCompleteOrder')); } else { $application->StoreVar('gw_error', $gateway_object->getErrorMsg()); Index: branches/5.2.x/units/addresses/addresses_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/addresses/addresses_event_handler.php (.../addresses_event_handler.php) (revision 15061) +++ branches/5.2.x/units/addresses/addresses_event_handler.php (.../addresses_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->isAdminUser ) { return; @@ -174,7 +174,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -191,7 +191,7 @@ * @return bool * @access protected */ - protected function OnUpdateProfileAddress(kEvent &$event) + protected function OnUpdateProfileAddress(kEvent $event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -266,7 +266,7 @@ * @return bool * @access protected */ - protected function OnUpdateUserProfile(kEvent &$event) + protected function OnUpdateUserProfile(kEvent $event) { $user =& $event->MasterEvent->getObject(); /* @var $user UsersItem */ @@ -328,7 +328,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { if ( $this->Application->isAdminUser ) { return true; @@ -357,7 +357,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -391,7 +391,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -412,7 +412,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -429,7 +429,7 @@ * * @param kEvent $event */ - function OnModifyUsersConfig(&$event) + function OnModifyUsersConfig($event) { $title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets'); Index: branches/5.2.x/units/manufacturers/manufacturers_event_handler.php =================================================================== diff -u -N -r15071 -r15134 --- branches/5.2.x/units/manufacturers/manufacturers_event_handler.php (.../manufacturers_event_handler.php) (revision 15071) +++ branches/5.2.x/units/manufacturers/manufacturers_event_handler.php (.../manufacturers_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ SetDBField('TransactionStatus', $transaction_status); if ($transaction_status == 1) { - $dummy_var = '10'; $application->SetVar('ord_id', $order->GetID()); // used in OrdersEventHandler::UpdateOrderItem - $application->HandleEvent($dummy_var, 'ord:OnCompleteOrder'); + $application->HandleEvent(new kEvent('ord:OnCompleteOrder')); } $application->Done(); \ No newline at end of file Index: branches/5.2.x/units/orders/orders_config.php =================================================================== diff -u -N -r15009 -r15134 --- branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 15009) +++ branches/5.2.x/units/orders/orders_config.php (.../orders_config.php) (revision 15134) @@ -1,6 +1,6 @@ Array ( Array ('pseudo' => 'OrderCalculator', 'class' => 'OrderCalculator', 'file' => 'order_calculator.php', 'build_event' => ''), Array ('pseudo' => 'OrderManager', 'class' => 'OrderManager', 'file' => 'order_manager.php', 'build_event' => ''), - Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => '', 'require_classes' => 'kValidator'), + Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => ''), ), 'Hooks' => Array ( Index: branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php =================================================================== diff -u -N -r14717 -r15134 --- branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 14717) +++ branches/5.2.x/units/shipping_quote_engines/shipping_quote_engines_config.php (.../shipping_quote_engines_config.php) (revision 15134) @@ -1,6 +1,6 @@ Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( Array ('pseudo' => 'ShippingQuoteEngine', 'class' => 'ShippingQuoteEngine', 'file' => 'shipping_quote_engine.php', 'build_event' => ''), - Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''), - Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''), - Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''), - Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => '', 'require_classes' => 'ShippingQuoteEngine'), + Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'build_event' => ''), + Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'build_event' => ''), + Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'build_event' => ''), + Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => ''), ), 'AutoLoad' => true, 'Hooks' => Array ( Index: branches/5.2.x/units/pricing/pricing_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/pricing/pricing_event_handler.php (.../pricing_event_handler.php) (revision 15061) +++ branches/5.2.x/units/pricing/pricing_event_handler.php (.../pricing_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ eventMethods = array_merge($this->eventMethods, $brackets_events); } - function PricingBracketsAction(&$event) + function PricingBracketsAction($event) { $event->redirect=false; $temp = $this->Application->GetVar($event->getPrefixSpecial(true)); @@ -184,7 +184,7 @@ $this->Application->SetVar($event->getPrefixSpecial(true), $temp); // store pr_tang var } - function OnPreSaveBrackets(&$event) + function OnPreSaveBrackets($event) { if( $this->Application->GetVar('pr_tang') ) { @@ -250,7 +250,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { $bracket =& $event->getObject(); /* @var $bracket kDBItem */ @@ -266,7 +266,7 @@ } } - function OnArrangeBrackets(&$event, &$temp, &$bracket) + function OnArrangeBrackets($event, &$temp, &$bracket) { $temp_orig = $temp; reset($temp); @@ -375,7 +375,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); $this->StoreSelectedIDs($event); @@ -398,7 +398,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -421,7 +421,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -458,7 +458,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBList */ Index: branches/5.2.x/units/zones/zones_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/zones/zones_event_handler.php (.../zones_event_handler.php) (revision 15061) +++ branches/5.2.x/units/zones/zones_event_handler.php (.../zones_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $zone_object kDBItem */ @@ -93,8 +93,7 @@ $this->Application->SetVar('dst', $temp); } - $dst_event = new kEvent('dst:OnCreate'); - $this->Application->HandleEvent($dst_event); + $this->Application->HandleEvent(new kEvent('dst:OnCreate')); break; } } @@ -104,7 +103,7 @@ * * @param kEvent $event */ - function OnTypeChange(&$event) + function OnTypeChange($event) { $this->Application->DeleteVar('dst'); @@ -117,7 +116,7 @@ * * @param kEvent $event */ - function DestinationAction(&$event) + function DestinationAction($event) { $event->redirect = false; @@ -219,7 +218,7 @@ } } - function OnCountryChange(&$event) + function OnCountryChange($event) { $destinations = &$this->Application->recallObject('dst'); @@ -239,7 +238,7 @@ * @return void * @access protected */ - protected function OnCancel(kEvent &$event) + protected function OnCancel(kEvent $event) { parent::OnCancel($event); @@ -266,7 +265,7 @@ * @return void * @access protected */ - protected function OnNew(kEvent &$event) + protected function OnNew(kEvent $event) { parent::OnNew($event); Index: branches/5.2.x/units/orders/order_validator.php =================================================================== diff -u -N -r14702 -r15134 --- branches/5.2.x/units/orders/order_validator.php (.../order_validator.php) (revision 14702) +++ branches/5.2.x/units/orders/order_validator.php (.../order_validator.php) (revision 15134) @@ -1,6 +1,6 @@ ErrorMsgs['credit_card_validation_error'] = '!lu_cc_validation_error!'; $this->ErrorMsgs['credit_card_expired'] = '!lu_cc_expired!'; Index: branches/5.2.x/units/downloads/downloads_config.php =================================================================== diff -u -N -r14582 -r15134 --- branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 14582) +++ branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 15134) @@ -1,6 +1,6 @@ Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), 'RegisterClasses' => Array( - Array('pseudo'=>'DownloadHelper','class'=>'DownloadHelper','file'=>'download_helper.php','build_event'=>'','require_classes'=>'kHelper'), + Array('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''), ), 'AutoLoad' => true, Index: branches/5.2.x/units/destinations/dst_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/destinations/dst_event_handler.php (.../dst_event_handler.php) (revision 15061) +++ branches/5.2.x/units/destinations/dst_event_handler.php (.../dst_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -59,7 +59,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $type != 'before' ) { return; @@ -87,9 +87,10 @@ * * @param kEvent $event */ - function OnZoneUpdate(&$event) { + function OnZoneUpdate($event) { - $object = &$event->getObject(); + $object =& $event->getObject(); + /* @var $object kDBItem */ $zone_object = &$this->Application->recallObject('z'); $zone_id = (int)$zone_object->GetID(); Index: branches/5.2.x/units/coupons/coupons_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/coupons/coupons_event_handler.php (.../coupons_event_handler.php) (revision 15061) +++ branches/5.2.x/units/coupons/coupons_event_handler.php (.../coupons_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ StoreSelectedIDs($event); @@ -71,7 +71,7 @@ * @return void * @access protected */ - protected function OnBeforeClone(kEvent &$event) + protected function OnBeforeClone(kEvent $event) { parent::OnBeforeClone($event); @@ -89,7 +89,7 @@ $object->SetDBField('Expiration_time', $expiration); } - function OnApplyClone(&$event) + function OnApplyClone($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -174,7 +174,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::OnPreCreate($event); @@ -198,7 +198,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -212,7 +212,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -224,7 +224,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->getObject(); /* @var $object kDBItem */ Index: branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (.../affiliate_payment_types_event_handler.php) (revision 15061) +++ branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (.../affiliate_payment_types_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ @@ -57,7 +57,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -71,7 +71,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -83,7 +83,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -106,7 +106,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $ids = $event->getEventParam('ids'); Index: branches/5.2.x/units/orders/orders_item.php =================================================================== diff -u -N -r15047 -r15134 --- branches/5.2.x/units/orders/orders_item.php (.../orders_item.php) (revision 15047) +++ branches/5.2.x/units/orders/orders_item.php (.../orders_item.php) (revision 15134) @@ -1,6 +1,6 @@ GetDBField('GiftCertificateId'); if ($gc_id < 1) { Index: branches/5.2.x/units/product_options/product_options_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/product_options/product_options_event_handler.php (.../product_options_event_handler.php) (revision 15061) +++ branches/5.2.x/units/product_options/product_options_event_handler.php (.../product_options_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -71,7 +71,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -105,7 +105,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { switch ($type) { case 'before': @@ -133,9 +133,10 @@ * * @param kEvent $event */ - function OnZoneUpdate(&$event) { + function OnZoneUpdate($event) { - $object = &$event->getObject(); + $object =& $event->getObject(); + /* @var $object kDBItem */ $zone_object = &$this->Application->recallObject('tax'); $zone_id = (int)$this->Application->GetVar('tax_id'); Index: branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php (.../affiliate_payments_event_handler.php) (revision 15061) +++ branches/5.2.x/units/affiliate_payments/affiliate_payments_event_handler.php (.../affiliate_payments_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Special == 'log' ) { return ; @@ -57,7 +57,7 @@ * @return void * @access protected */ - protected function OnNew(kEvent &$event) + protected function OnNew(kEvent $event) { parent::OnNew($event); @@ -78,7 +78,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -109,7 +109,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); Index: branches/5.2.x/units/coupon_items/coupon_items_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/coupon_items/coupon_items_event_handler.php (.../coupon_items_event_handler.php) (revision 15061) +++ branches/5.2.x/units/coupon_items/coupon_items_event_handler.php (.../coupon_items_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->recallObject('di_EventHandler'); @@ -52,7 +52,7 @@ * @todo get parent item id through $object->getLinkedInfo()['ParentId'] * @access public */ - function OnEntireOrder(&$event) + function OnEntireOrder($event) { $object =& $event->GetObject(); $sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id'); @@ -79,7 +79,7 @@ * * @param kEvent $event */ - function OnDeleteCouponItem(&$event) + function OnDeleteCouponItem($event) { $main_object =& $event->MasterEvent->getObject(); $resource_id = $main_object->GetDBField('ResourceId'); @@ -96,7 +96,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: branches/5.2.x/units/order_items/order_items_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/order_items/order_items_event_handler.php (.../order_items_event_handler.php) (revision 15061) +++ branches/5.2.x/units/order_items/order_items_event_handler.php (.../order_items_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject( Array('skip_autoload' => true) ); @@ -93,7 +93,7 @@ * @return void * @access protected */ - protected function OnUpdate(kEvent &$event) + protected function OnUpdate(kEvent $event) { $items_info = $this->Application->GetVar($event->getPrefixSpecial(true)); @@ -160,7 +160,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -257,7 +257,7 @@ * * @param kEvent $event */ - function OnSaveItems(&$event) + function OnSaveItems($event) { $event->CallSubEvent('OnUpdate'); @@ -274,7 +274,7 @@ * @return void * @access protected */ - protected function OnAfterClone(kEvent &$event) + protected function OnAfterClone(kEvent $event) { parent::OnAfterClone($event); @@ -296,7 +296,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -320,7 +320,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -345,7 +345,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { if ( $this->Application->isAdmin ) { return true; Index: branches/5.2.x/units/payment_type/payment_type_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/payment_type/payment_type_event_handler.php (.../payment_type_event_handler.php) (revision 15061) +++ branches/5.2.x/units/payment_type/payment_type_event_handler.php (.../payment_type_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject( Array('skip_autoload' => true) ); $this->StoreSelectedIDs($event); @@ -75,7 +75,7 @@ $event->SetRedirectParam('opener', 's'); } - function OnMassDecline(&$event) + function OnMassDecline($event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -113,7 +113,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -136,7 +136,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -151,7 +151,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $object =& $event->getObject(); @@ -183,7 +183,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { $this->Application->StoreVar('check_unused_currencies', 1); @@ -197,7 +197,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -213,7 +213,7 @@ * * @param kEvent $event */ - function convertGroups(&$event) + function convertGroups($event) { $object =& $event->getObject(); @@ -236,7 +236,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( $event->Special == 'auto-ord' ) { $main_object =& $this->Application->recallObject('ord'); @@ -263,7 +263,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); Index: branches/5.2.x/units/shipping_costs/shipping_costs_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/shipping_costs/shipping_costs_event_handler.php (.../shipping_costs_event_handler.php) (revision 15061) +++ branches/5.2.x/units/shipping_costs/shipping_costs_event_handler.php (.../shipping_costs_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -87,9 +87,9 @@ * * @param kEvent $event */ - function OnPropagate(&$event) + function OnPropagate($event) { - // $this->OnCreate(&$event); + // $this->OnCreate($event); $object =& $event->getObject(); @@ -158,19 +158,17 @@ } } - /* $shipping_event = new kEvent(); - $shipping_event->Init('s'); - $shipping_event->Name = 'OnPreSave'; + /*$shipping_event = new kEvent('s:OnPreSave'); $shipping_event->status = kEvent::erFATAL; - $this->Application->HandleEvent(&$shipping_event);*/ + $this->Application->HandleEvent($shipping_event);*/ } /** * Enter description here... * * @param kEvent $event */ - function OnClearAll(&$event) + function OnClearAll($event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -199,7 +197,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $type == 'before' && $this->Application->GetVar('sc') ) { $shipping_obj =& $this->Application->recallObject('s'); @@ -226,7 +224,7 @@ * * @param kEvent $event */ - function OnSaveCreated(&$event) + function OnSaveCreated($event) { $event->CallSubEvent('OnCreate'); $event->redirect = false; @@ -241,7 +239,7 @@ * @return void * @access protected */ - protected function OnAfterCopyToTemp(kEvent &$event) + protected function OnAfterCopyToTemp(kEvent $event) { parent::OnAfterCopyToTemp($event); @@ -274,7 +272,7 @@ * @return void * @access protected */ - protected function OnBeforeCopyToLive(kEvent &$event) + protected function OnBeforeCopyToLive(kEvent $event) { parent::OnBeforeCopyToLive($event); Index: branches/5.2.x/units/brackets/brackets_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/brackets/brackets_event_handler.php (.../brackets_event_handler.php) (revision 15061) +++ branches/5.2.x/units/brackets/brackets_event_handler.php (.../brackets_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->GetVar('s_id') === false ) { return; @@ -72,7 +72,7 @@ } } - function prepareBrackets(&$event) + function prepareBrackets($event) { $lang_object =& $this->Application->recallObject('lang.current'); /* @var $lang_object LanguagesItem */ @@ -113,7 +113,7 @@ * * @param kEvent $event */ - function OnMoreBrackets(&$event) + function OnMoreBrackets($event) { $brackets_helper =& $this->getHelper($event); @@ -125,7 +125,7 @@ * * @param kEvent $event */ - function OnArrange(&$event) + function OnArrange($event) { $brackets_helper =& $this->getHelper($event); @@ -138,7 +138,7 @@ * * @param kEvent $event */ - function OnInfinity(&$event) + function OnInfinity($event) { $brackets_helper =& $this->getHelper($event); @@ -156,7 +156,7 @@ * @param bool $event_readonly * @return kBracketsHelper */ - protected function &getHelper(&$event, $event_readonly = false) + protected function &getHelper($event, $event_readonly = false) { $shipping_object =& $this->Application->recallObject('s'); /* @var $shipping_object kDBItem */ @@ -183,7 +183,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -202,7 +202,7 @@ * * @param kEvent $event */ - function OnPreSaveBrackets(&$event) + function OnPreSaveBrackets($event) { $lang_object =& $this->Application->recallObject('lang.current'); /* @var $lang_object LanguagesItem */ Index: branches/5.2.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15061) +++ branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->isAdminUser ) { if ( $event->Name == 'OnCreate' ) { @@ -176,7 +176,7 @@ /* ======================== FRONT ONLY ======================== */ - function OnQuietPreSave(&$event) + function OnQuietPreSave($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -191,7 +191,7 @@ * * @param kEvent $event */ - function OnSelectAddress(&$event) + function OnSelectAddress($event) { if ($this->Application->isAdminUser) { return ; @@ -252,7 +252,7 @@ * * @param kEvent $event */ - function OnUserCreate(&$event) + function OnUserCreate($event) { if( !($event->MasterEvent->status == kEvent::erSUCCESS) ) return false; @@ -271,7 +271,7 @@ * @return void * @access protected */ - protected function OnUserLogin(&$event) + protected function OnUserLogin($event) { if ( ($event->MasterEvent->status != kEvent::erSUCCESS) || kUtil::constOn('IS_INSTALL') ) { // login failed OR login during installation @@ -301,7 +301,7 @@ * @param kEvent $event * @return void */ - function updateUserID($order_id, &$event) + function updateUserID($order_id, $event) { $user =& $this->Application->recallObject('u.current'); /* @var $user UsersItem */ @@ -380,7 +380,7 @@ return $email_params; } - function PrepareCoupons(&$event, &$order) + function PrepareCoupons($event, &$order) { $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) ); /* @var $order_items kDBList */ @@ -432,7 +432,7 @@ * @param kEvent $event * @return bool */ - function OnCompleteOrder(&$event) + function OnCompleteOrder($event) { $this->LockTables($event); if ( !$this->CheckQuantites($event) ) { @@ -526,7 +526,7 @@ * * @param kEvent $event */ - function setBillingAddress(&$event) + function setBillingAddress($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -557,7 +557,7 @@ * * @param kEvent $event */ - function OnProceedToPreview(&$event) + function OnProceedToPreview($event) { $this->setBillingAddress($event); @@ -566,13 +566,13 @@ } - function OnViewCart(&$event) + function OnViewCart($event) { $this->StoreContinueShoppingLink(); $event->redirect = $this->Application->GetVar('viewcart_template'); } - function OnContinueShopping(&$event) + function OnContinueShopping($event) { $order_helper =& $this->Application->recallObject('OrderHelper'); /* @var $order_helper OrderHelper */ @@ -587,7 +587,7 @@ * * @param kEvent $event */ - function OnCheckout(&$event) + function OnCheckout($event) { $this->OnUpdateCart($event); if ( !$event->getEventParam('RecalculateChangedCart') ) { @@ -633,7 +633,7 @@ * @return void * @access protected */ - protected function OnRestoreOrder(kEvent &$event) + protected function OnRestoreOrder(kEvent $event) { if ( $this->Application->isAdmin || $this->Application->RecallVar('ord_id') ) { // admin OR there is an active order -> don't restore from cookie @@ -663,7 +663,7 @@ * * @param kEvent $event */ - function OnProceedToBilling(&$event) + function OnProceedToBilling($event) { $items_info = $this->Application->GetVar($event->getPrefixSpecial(true)); if ( $items_info ) { @@ -695,7 +695,7 @@ * @param kEvent $event * @return void */ - protected function OnCancelRecurring(&$event) + protected function OnCancelRecurring($event) { $order =& $event->getObject(); /* @var $order OrdersItem */ @@ -715,7 +715,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -737,7 +737,7 @@ * @return void * @access protected */ - protected function OnUpdate(kEvent &$event) + protected function OnUpdate(kEvent $event) { $this->setBillingAddress($event); @@ -767,7 +767,7 @@ * * @param kEvent $event */ - function createMissingAddresses(&$event) + function createMissingAddresses($event) { if ( !$this->Application->LoggedIn() ) { return ; @@ -822,9 +822,9 @@ * @return void * @access protected */ - protected function OnUpdateCart(&$event) + protected function OnUpdateCart($event) { - $this->Application->HandleEvent($items_event, 'orditems:OnUpdate'); + $this->Application->HandleEvent(new kEvent('orditems:OnUpdate')); $event->CallSubEvent('OnRecalculateItems'); } @@ -834,7 +834,7 @@ * * @param kEvent $event */ - function OnUpdateCartJSON(&$event) + function OnUpdateCartJSON($event) { if ( $this->Application->GetVar('ajax') != 'yes' ) { return; @@ -865,7 +865,7 @@ } // 3. update product quantities and recalculate all discounts - $this->Application->HandleEvent($items_event, 'orditems:OnUpdate'); + $this->Application->HandleEvent(new kEvent('orditems:OnUpdate')); $event->CallSubEvent('OnRecalculateItems'); // 4. remove "orditems" object of kDBItem class, since getOrderInfo uses kDBList object under same prefix @@ -885,7 +885,7 @@ * * @param kEvent $event */ - function OnAddToCart(&$event) + function OnAddToCart($event) { $this->StoreContinueShoppingLink(); @@ -1000,7 +1000,7 @@ * @return string * @todo Needed? Should be refactored (by Alex) */ - function TablePrefix(kEvent &$event) + function TablePrefix(kEvent $event) { return $this->UseTempTables($event) ? $this->Application->GetTempTablePrefix('prefix:' . $event->Prefix) . TABLE_PREFIX : TABLE_PREFIX; } @@ -1015,7 +1015,7 @@ * @param int $selection_mode * @return bool */ - function CheckOptions(&$event, &$options, $product_id, $qty, $selection_mode) + function CheckOptions($event, &$options, $product_id, $qty, $selection_mode) { // 1. check for required options $selection_filter = $selection_mode == 1 ? ' AND OptionType IN (1,3,6) ' : ''; @@ -1099,7 +1099,7 @@ * * @param kEvent $event */ - function OnUpdateItemOptions(&$event) + function OnUpdateItemOptions($event) { $opt_data = $this->Application->GetVar('options'); $options = getArrayValue($opt_data, $this->Application->GetVar('p_id')); @@ -1167,7 +1167,7 @@ * * @param kEvent $event */ - function OnApplyCoupon(&$event) + function OnApplyCoupon($event) { $code = $this->Application->GetVar('coupon_code'); @@ -1238,7 +1238,7 @@ * @param kEvent $event * @deprecated */ - function OnRemoveCoupon(&$event) + function OnRemoveCoupon($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -1277,7 +1277,7 @@ * * @param kEvent $event */ - function OnAddVirtualProductToCart(&$event) + function OnAddVirtualProductToCart($event) { $l_info = $this->Application->GetVar('l'); if($l_info) @@ -1315,15 +1315,15 @@ $event->SetRedirectParam('m_cat_id', 0); // not to pass link id } - function OnRemoveFromCart(&$event) + function OnRemoveFromCart($event) { $ord_item_id = $this->Application->GetVar('orditems_id'); $ord_id = $this->getPassedID($event); $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$ord_id.' AND OrderItemId = '.$ord_item_id); $this->OnRecalculateItems($event); } - function OnCleanupCart(&$event) + function OnCleanupCart($event) { $object =& $event->getObject(); @@ -1344,7 +1344,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { $event->setEventParam('raise_warnings', 0); $passed = parent::getPassedID($event); @@ -1392,7 +1392,7 @@ * @return void * @access protected */ - protected function LoadItem(kEvent &$event) + protected function LoadItem(kEvent $event) { $id = $this->getPassedID($event); @@ -1415,7 +1415,7 @@ * * @param kEvent $event */ - function _createNewCart(&$event) + function _createNewCart($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object kDBItem */ @@ -1509,7 +1509,7 @@ * * @param kEvent $event */ - function SetStepRequiredFields(&$event) + function SetStepRequiredFields($event) { $order =& $event->getObject(); /* @var $order OrdersItem */ @@ -1566,7 +1566,7 @@ * * @param kEvent $event */ - function CheckUser(&$event) + function CheckUser($event) { if ($this->Application->isAdminUser || defined('GW_NOTIFY')) { // don't check for user in order while processing payment @@ -1600,7 +1600,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::OnPreCreate($event); @@ -1622,7 +1622,7 @@ * @return void * @access protected */ - protected function OnBeforeClone(kEvent &$event) + protected function OnBeforeClone(kEvent $event) { parent::OnBeforeClone($event); @@ -1643,7 +1643,7 @@ $object->SetDBField('GWResult2', ''); } - function OnReserveItems(&$event) + function OnReserveItems($event) { $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) ); /* @var $order_items kDBList */ @@ -1711,7 +1711,7 @@ return true; } - function OnOrderPrint(&$event) + function OnOrderPrint($event) { $event->SetRedirectParam('opener', 's'); } @@ -1722,7 +1722,7 @@ * @param kEvent $event * @access public */ - function OnResetAddress(&$event) + function OnResetAddress($event) { $to_tab = $this->Application->GetVar('to_tab'); $from_tab = substr($event->Name, strlen('OnResetTo')); @@ -1747,7 +1747,7 @@ * @todo Is this called ? (by Alex) * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $selected_ids = $this->Application->GetVar('selected_ids'); $product_ids = $selected_ids['p']; @@ -1764,7 +1764,7 @@ $event->SetRedirectParam('opener', 'u'); } - function OnMassPlaceOrder(&$event) + function OnMassPlaceOrder($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); $ids = $this->StoreSelectedIDs($event); @@ -1985,7 +1985,7 @@ * * @param kEvent $event */ - function MassInventoryAction(&$event) + function MassInventoryAction($event) { if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; @@ -2006,7 +2006,7 @@ } } - function InventoryAction(&$event) + function InventoryAction($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -2240,7 +2240,7 @@ * * @param kEvent $event */ - function setNextOrderNumber(&$event) + function setNextOrderNumber($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -2294,7 +2294,7 @@ * @return void * @access protected */ - protected function OnAfterClone(kEvent &$event) + protected function OnAfterClone(kEvent $event) { parent::OnAfterClone($event); @@ -2319,7 +2319,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -2367,7 +2367,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -2385,7 +2385,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -2469,7 +2469,7 @@ * @return void * @access protected */ - protected function createAccountFromOrder(&$event) + protected function createAccountFromOrder($event) { $order =& $event->getObject(); /* @var $order OrdersItem */ @@ -2484,8 +2484,7 @@ if ( $order->GetDBField('PortalUserId') == USER_GUEST ) { // will also auto-login user when created $this->Application->SetVar('u_register', Array (USER_GUEST => $user_fields)); - $user_event = new kEvent('u.register:OnCreate'); - $this->Application->HandleEvent($user_event); + $this->Application->HandleEvent(new kEvent('u.register:OnCreate')); } else { $user =& $this->Application->recallObject('u.current'); @@ -2506,7 +2505,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -2558,7 +2557,7 @@ return $type2special[$type]; } - function LockTables(&$event) + function LockTables($event) { $read = Array(); $write_lock = ''; @@ -2582,7 +2581,7 @@ * @param kEvent $event * @return bool */ - function CheckQuantites(&$event) + function CheckQuantites($event) { if ( $this->OnRecalculateItems($event) ) { // if something has changed in the order if ( $this->Application->isAdminUser ) { @@ -2600,7 +2599,7 @@ return true; } - function DoPlaceOrder(&$event) + function DoPlaceOrder($event) { $order =& $event->getObject(); @@ -2616,7 +2615,7 @@ return true; } - function &queryOrderItems(&$event, $table_prefix) + function &queryOrderItems($event, $table_prefix) { $order =& $event->getObject(); $ord_id = $order->GetId(); @@ -2643,7 +2642,7 @@ return $items; } - function ReserveItems(&$event) + function ReserveItems($event) { $table_prefix = $this->TablePrefix($event); $items =& $this->queryOrderItems($event, $table_prefix); @@ -2693,7 +2692,7 @@ } } - function FreeItems(&$event) + function FreeItems($event) { $table_prefix = $this->TablePrefix($event); $items =& $this->queryOrderItems($event, $table_prefix); @@ -2745,7 +2744,7 @@ * @param kEvent $event * @param OrdersItem $object */ - function SplitOrder(&$event, &$object) + function SplitOrder($event, &$object) { $affiliate_event = new kEvent('affil:OnOrderApprove'); $affiliate_event->setEventParam('Order_PrefixSpecial', $object->getPrefixSpecial() ); @@ -3004,7 +3003,7 @@ * @param kEvent $event * @param int $item_id */ - function AddItemToOrder(&$event, $item_id, $qty = null, $package_num = null) + function AddItemToOrder($event, $item_id, $qty = null, $package_num = null) { if (!isset($qty)) { $qty = 1; @@ -3048,15 +3047,15 @@ $manager->setOrder($order); $manager->addProduct($product, $event->getEventParam('ItemData'), $qty, $package_num); - $this->Application->HandleEvent($ord_event, 'ord:OnRecalculateItems'); + $this->Application->HandleEvent(new kEvent('ord:OnRecalculateItems')); } /** * Enter description here... * * @param kEvent $event */ - function UpdateShippingTotal(&$event) + function UpdateShippingTotal($event) { if ( $this->Application->GetVar('ebay_notification') == 1 ) { // TODO: get rid of this "if" @@ -3092,7 +3091,7 @@ * @param kEvent $event * @return bool Returns true if items splitting/grouping were changed */ - function OnRecalculateItems(&$event) + function OnRecalculateItems($event) { if (is_object($event->MasterEvent) && ($event->MasterEvent->status != kEvent::erSUCCESS)) { // e.g. master order update failed, don't recalculate order products @@ -3192,7 +3191,7 @@ return $price_id; } - function UpdateShippingOption(&$event) + function UpdateShippingOption($event) { $object =& $event->getObject(); $shipping_option = $object->GetDBField('ShippingOption'); @@ -3223,7 +3222,7 @@ * @param kEvent $event * @return bool */ - function UpdateShippingTypes(&$event) + function UpdateShippingTypes($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -3305,7 +3304,7 @@ return true; }*/ - function RecalculateTax(&$event) + function RecalculateTax($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -3317,7 +3316,7 @@ $object->RecalculateTax(); } - function RecalculateProcessingFee(&$event) + function RecalculateProcessingFee($event) { $object =& $event->getObject(); @@ -3331,15 +3330,15 @@ $this->UpdateTotals($event); } - function UpdateTotals(&$event) + function UpdateTotals($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ $object->UpdateTotals(); } - /*function CalculateDiscount(&$event) + /*function CalculateDiscount($event) { $object =& $event->getObject(); @@ -3388,7 +3387,7 @@ * * @param kEvent $event */ - function OnGoToOrder(&$event) + function OnGoToOrder($event) { $id = array_shift( $this->StoreSelectedIDs($event) ); @@ -3424,7 +3423,7 @@ * * @param kEvent $event */ - function OnResetToPending(&$event) + function OnResetToPending($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object kDBItem */ @@ -3453,7 +3452,7 @@ * * @param kEvent $event */ - function OnLoadSelected(&$event) + function OnLoadSelected($event) { $event->setPseudoClass('_List'); $object =& $event->getObject( Array('selected_only' => true) ); @@ -3483,7 +3482,7 @@ * * @param kEvent $event */ - function OnCheckRecurringOrders(&$event) + function OnCheckRecurringOrders($event) { $skip_clause = Array(); $ord_table = $this->Application->getUnitOption($event->Prefix, 'TableName'); @@ -3552,7 +3551,7 @@ } - function OnGeneratePDF(&$event) + function OnGeneratePDF($event) { $this->OnLoadSelected($event); @@ -3635,7 +3634,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -3700,7 +3699,7 @@ * @return void * @access protected */ - protected function OnBeforeExportBegin(kEvent &$event) + protected function OnBeforeExportBegin(kEvent $event) { parent::OnBeforeExportBegin($event); @@ -3734,7 +3733,7 @@ * @return Array * @access protected */ - public function getCustomExportColumns(kEvent &$event) + public function getCustomExportColumns(kEvent $event) { $columns = parent::getCustomExportColumns($event); @@ -3758,7 +3757,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { parent::OnSave($event); @@ -3784,7 +3783,7 @@ * @return void * @access protected */ - protected function OnBeforeCopyToLive(kEvent &$event) + protected function OnBeforeCopyToLive(kEvent $event) { parent::OnBeforeCopyToLive($event); @@ -3802,7 +3801,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { if ( $this->Application->isAdminUser ) { return true; @@ -3824,7 +3823,7 @@ * * @param kEvent $event */ - function OnApplyGiftCertificate(&$event) + function OnApplyGiftCertificate($event) { $code = $this->Application->GetVar('giftcert_code'); @@ -3871,7 +3870,7 @@ * @param kEvent $event * @deprecated */ - function OnRemoveGiftCertificate(&$event) + function OnRemoveGiftCertificate($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -3887,7 +3886,7 @@ $object->RemoveGiftCertificate(); } - function RecalculateGift(&$event) + function RecalculateGift($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -3915,7 +3914,7 @@ * * @param kEvent $event */ - function OnDownloadLabel(&$event) + function OnDownloadLabel($event) { $event->status = kEvent::erSTOP; ini_set('memory_limit', '300M'); @@ -3943,7 +3942,7 @@ * @return void * @access protected */ - protected function OnBeforeItemValidate(kEvent &$event) + protected function OnBeforeItemValidate(kEvent $event) { parent::OnBeforeItemValidate($event); @@ -3975,7 +3974,7 @@ * * @param kEvent $event */ - function OnUpdateAjax(&$event) + function OnUpdateAjax($event) { $ajax_form_helper =& $this->Application->recallObject('AjaxFormHelper'); /* @var $ajax_form_helper AjaxFormHelper */ Index: branches/5.2.x/units/currencies/currencies_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 15061) +++ branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Special == 'current' ) { return Array ('ISO' => $this->Application->RecallVar('curr_iso')); @@ -65,7 +65,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -86,7 +86,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -120,7 +120,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -161,7 +161,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { $this->Application->StoreVar('saved_curr_ids', $this->Application->RecallVar($event->Prefix . '_selected_ids')); @@ -173,7 +173,7 @@ * * @param kEvent $event */ - function OnDisableUnused(&$event) + function OnDisableUnused($event) { $unused_ids = $this->Application->GetVar('unused_ids'); @@ -190,7 +190,7 @@ * * @param kEvent $event */ - function OnUpdateRate(&$event) + function OnUpdateRate($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -230,7 +230,7 @@ * * @param kEvent $event */ - function OnUpdateRates(&$event) + function OnUpdateRates($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -275,7 +275,7 @@ * @return void * @access protected */ - protected function OnChangeCurrency(&$event) + protected function OnChangeCurrency($event) { $currency_iso = $this->Application->GetVar('curr_iso'); $available_currencies = $this->Application->siteDomainField('Currencies'); @@ -305,7 +305,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: branches/5.2.x/units/gateways/gw_event_handler.php =================================================================== diff -u -N -r14702 -r15134 --- branches/5.2.x/units/gateways/gw_event_handler.php (.../gw_event_handler.php) (revision 14702) +++ branches/5.2.x/units/gateways/gw_event_handler.php (.../gw_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getPassedID($event); @@ -56,7 +56,7 @@ } } - protected function OnCheckGateways(&$event) + protected function OnCheckGateways($event) { if ( !$this->Application->isAdminUser ) { return; Index: branches/5.2.x/units/helpers/helpers_config.php =================================================================== diff -u -N -r14839 -r15134 --- branches/5.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 14839) +++ branches/5.2.x/units/helpers/helpers_config.php (.../helpers_config.php) (revision 15134) @@ -9,10 +9,10 @@ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'), + Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => ''), Array ('pseudo' => 'CurrencyRates', 'class' => 'CurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''), - Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''), - Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''), - Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''), + Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'build_event' => ''), + Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'build_event' => ''), + Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'build_event' => ''), ), ); Index: branches/5.2.x/units/shipping_quote_engines/shipping_quote_engine_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (.../shipping_quote_engine_event_handler.php) (revision 15061) +++ branches/5.2.x/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (.../shipping_quote_engine_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ Index: branches/5.2.x/units/gateways/gw_classes/paypal.php =================================================================== diff -u -N -r14258 -r15134 --- branches/5.2.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 14258) +++ branches/5.2.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 15134) @@ -1,6 +1,6 @@ Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$_POST['item_number']); - $this->Application->HandleEvent($an_event, 'p:OnSubscriptionApprove', array('field_values' => $field_values)); + $this->Application->HandleEvent(new kEvent('p:OnSubscriptionApprove', array('field_values' => $field_values))); $success = 0; //this will eliminate OnCompleteOrder in gw_notify! $org_order = $this->Application->recallObject('ord.-original', 'ord', Array('skip_autoload' => true)); Index: branches/5.2.x/units/sections/section_eh.php =================================================================== diff -u -N -r14582 -r15134 --- branches/5.2.x/units/sections/section_eh.php (.../section_eh.php) (revision 14582) +++ branches/5.2.x/units/sections/section_eh.php (.../section_eh.php) (revision 15134) @@ -1,6 +1,6 @@ Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets'); $edit_tab_presets['Default']['in-commerce'] = Array ( Index: branches/5.2.x/units/products/products_config.php =================================================================== diff -u -N -r15009 -r15134 --- branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 15009) +++ branches/5.2.x/units/products/products_config.php (.../products_config.php) (revision 15134) @@ -1,6 +1,6 @@ 'p', - 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'require_classes' => Array ('kCatDBItem'), 'build_event' => 'OnItemBuild'), + 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array ( 1 => 'id', Index: branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php =================================================================== diff -u -N -r14717 -r15134 --- branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 14717) +++ branches/5.2.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 15134) @@ -1,6 +1,6 @@ Array ('class' => 'ProductOptionCombinationsEventHandler', 'file' => 'product_option_combinations_event_handler.php', 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array ('class' => 'ProductOptionCombinationsTagProcessor', 'file' => 'product_option_combinations_tag_processor.php', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'), - Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'), + Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''), + Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''), ), 'AutoLoad' => true, 'Hooks' => Array ( Index: branches/5.2.x/units/files/files_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/files/files_event_handler.php (.../files_event_handler.php) (revision 15061) +++ branches/5.2.x/units/files/files_event_handler.php (.../files_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Special == 'downl' ) { return ''; @@ -39,7 +39,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -60,7 +60,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -74,7 +74,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -103,7 +103,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -129,7 +129,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { $ids = $this->StoreSelectedIDs($event); $id = array_shift($ids); @@ -151,7 +151,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $ids = $event->getEventParam('ids'); Index: branches/5.2.x/units/affiliate_plans/affiliate_plans_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/affiliate_plans/affiliate_plans_event_handler.php (.../affiliate_plans_event_handler.php) (revision 15061) +++ branches/5.2.x/units/affiliate_plans/affiliate_plans_event_handler.php (.../affiliate_plans_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); $object->SetDBField('IsPrimary', 1); @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -68,7 +68,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -80,7 +80,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -109,7 +109,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $ids = $event->getEventParam('ids'); Index: branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (.../affiliate_plans_items_event_handler.php) (revision 15061) +++ branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (.../affiliate_plans_items_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->recallObject('di_EventHandler'); @@ -35,7 +35,7 @@ * @todo get parent item id through $object->getLinkedInfo()['ParentId'] * @access public */ - function OnEntireOrder(&$event) + function OnEntireOrder($event) { $object =& $event->GetObject(); $sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id'); @@ -62,7 +62,7 @@ * * @param kEvent $event */ - function OnDeleteDiscountedItem(&$event) + function OnDeleteDiscountedItem($event) { $main_object =& $event->MasterEvent->getObject(); $resource_id = $main_object->GetDBField('ResourceId'); @@ -79,7 +79,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: branches/5.2.x/units/taxes/taxes_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/taxes/taxes_event_handler.php (.../taxes_event_handler.php) (revision 15061) +++ branches/5.2.x/units/taxes/taxes_event_handler.php (.../taxes_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $zone_object kDBItem */ @@ -88,8 +88,7 @@ $this->Application->SetVar('taxdst', $temp); } - $dst_event = new kEvent('taxdst:OnCreate'); - $this->Application->HandleEvent($dst_event); + $this->Application->HandleEvent(new kEvent('taxdst:OnCreate')); } } @@ -98,7 +97,7 @@ * * @param kEvent $event */ - function OnTypeChange(&$event) + function OnTypeChange($event) { $this->Application->DeleteVar('taxdst'); $event->CallSubEvent('OnPreSave'); @@ -110,7 +109,7 @@ * * @param kEvent $event */ - function DestinationAction(&$event) + function DestinationAction($event) { $event->redirect = false; @@ -238,7 +237,7 @@ $event->CallSubEvent("OnPreSave"); } - function OnCountryChange(&$event) + function OnCountryChange($event) { $destinations = &$this->Application->recallObject('taxdst'); Index: branches/5.2.x/units/gift_certificates/gift_certificates_eh.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/gift_certificates/gift_certificates_eh.php (.../gift_certificates_eh.php) (revision 15061) +++ branches/5.2.x/units/gift_certificates/gift_certificates_eh.php (.../gift_certificates_eh.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ @@ -143,7 +143,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { parent::OnSave($event); @@ -168,7 +168,7 @@ * * @param kEvent $event */ - function OnEmailGiftCertificate(&$event) + function OnEmailGiftCertificate($event) { $ids = $this->StoreSelectedIDs($event); if (!$ids) { Index: branches/5.2.x/units/payment_type_currencies/payment_type_currencies_event_handler.php =================================================================== diff -u -N -r15061 -r15134 --- branches/5.2.x/units/payment_type_currencies/payment_type_currencies_event_handler.php (.../payment_type_currencies_event_handler.php) (revision 15061) +++ branches/5.2.x/units/payment_type_currencies/payment_type_currencies_event_handler.php (.../payment_type_currencies_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ Application->GetVar('currency_list');