Index: custom/units/helpers/helpers_config.php =================================================================== --- custom/units/helpers/helpers_config.php (revision 15111) +++ custom/units/helpers/helpers_config.php (working copy) @@ -9,6 +9,6 @@ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'), + Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => ''), ), ); \ No newline at end of file Index: custom/units/sections/articles/e_article_eh.php =================================================================== --- custom/units/sections/articles/e_article_eh.php (revision 15111) +++ custom/units/sections/articles/e_article_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -77,7 +77,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -102,7 +102,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -116,7 +116,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -131,7 +131,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -146,7 +146,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -160,7 +160,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -174,7 +174,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -189,7 +189,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -204,7 +204,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/sections/categories/e_category_eh.php =================================================================== --- custom/units/sections/categories/e_category_eh.php (revision 15111) +++ custom/units/sections/categories/e_category_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -77,7 +77,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -102,7 +102,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -116,7 +116,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -131,7 +131,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -146,7 +146,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -160,7 +160,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -174,7 +174,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -189,7 +189,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -203,7 +203,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/sections/custom_eh.php =================================================================== --- custom/units/sections/custom_eh.php (revision 15111) +++ custom/units/sections/custom_eh.php (working copy) @@ -13,7 +13,7 @@ * * @param kEvent $event */ - function OnOverrideClonedSubItems(&$event) + function OnOverrideClonedSubItems($event) { # register EReviewEventHandler class as extented from cloned ReviewEventHandler for article reviews ("n" prefix) // $this->Application->registerClass('EReviewEventHandler', dirname(__FILE__) . '/reviews/e_review_eh.php', 'n-rev_EventHandler'); @@ -24,7 +24,7 @@ * * @param kEvent $event */ - function OnModifyCategoriesConfig(&$event) + function OnModifyCategoriesConfig($event) { # get Fields configuration from /core/units/categories/categories_config.php $fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields'); Index: custom/units/sections/links/e_link_eh.php =================================================================== --- custom/units/sections/links/e_link_eh.php (revision 15111) +++ custom/units/sections/links/e_link_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -77,7 +77,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -102,7 +102,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -116,7 +116,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -131,7 +131,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -146,7 +146,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -161,7 +161,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -175,7 +175,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -190,7 +190,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -205,7 +205,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/sections/products/e_product_eh.php =================================================================== --- custom/units/sections/products/e_product_eh.php (revision 15111) +++ custom/units/sections/products/e_product_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -78,7 +78,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -103,7 +103,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -117,7 +117,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -132,7 +132,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -147,7 +147,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -161,7 +161,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -175,7 +175,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -190,7 +190,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -205,7 +205,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/sections/reviews/e_review_eh.php =================================================================== --- custom/units/sections/reviews/e_review_eh.php (revision 15111) +++ custom/units/sections/reviews/e_review_eh.php (working copy) @@ -15,7 +15,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -35,7 +35,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -49,7 +49,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -64,7 +64,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -79,7 +79,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -94,7 +94,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -108,7 +108,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -123,7 +123,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -138,7 +138,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/sections/users/e_user_eh.php =================================================================== --- custom/units/sections/users/e_user_eh.php (revision 15111) +++ custom/units/sections/users/e_user_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -54,7 +54,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -77,7 +77,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -102,7 +102,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -116,7 +116,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -131,7 +131,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -146,7 +146,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -161,7 +161,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -175,7 +175,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -190,7 +190,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -204,7 +204,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: custom/units/widgets/widget_eh.php =================================================================== --- custom/units/widgets/widget_eh.php (revision 15111) +++ custom/units/widgets/widget_eh.php (working copy) @@ -34,7 +34,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $skip_permissions_check_events = Array ( 'OnAnotherCustomEvent', @@ -52,7 +52,7 @@ * * @param kEvent $event */ - function OnCustomEvent(&$event) + function OnCustomEvent($event) { $object =& $event->getObject(); /* @var $object kDBList */ @@ -67,7 +67,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -87,7 +87,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -100,7 +100,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -114,7 +114,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -129,7 +129,7 @@ * @return void * @access protected */ - protected function OnBeforeItemLoad(kEvent &$event) + protected function OnBeforeItemLoad(kEvent $event) { parent::OnBeforeItemLoad($event); @@ -144,7 +144,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -158,7 +158,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -173,7 +173,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -187,7 +187,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); Index: in-auction/cron.php =================================================================== --- in-auction/cron.php (revision 15111) +++ in-auction/cron.php (working copy) @@ -26,7 +26,7 @@ $application->StoreVar('user_id', USER_ROOT); - $application->HandleEvent($event, 'l-ebay:OnListItems'); + $application->HandleEvent(new kEvent('l-ebay:OnListItems')); $application->Done(); Index: in-auction/hitcounter.php =================================================================== --- in-auction/hitcounter.php (revision 15111) +++ in-auction/hitcounter.php (working copy) @@ -26,7 +26,7 @@ $application->StoreVar('user_id', USER_ROOT); - $application->HandleEvent($event, 'l-ebay:OnHitAuction'); + $application->HandleEvent(new kEvent('l-ebay:OnHitAuction')); $filename = MODULES_PATH . '/in-auction/admin_templates/img/s.gif'; header('Content-type: image/gif'); header('Content-length: '.filesize($filename)); Index: in-auction/new_token_accept.php =================================================================== --- in-auction/new_token_accept.php (revision 15111) +++ in-auction/new_token_accept.php (working copy) @@ -31,7 +31,7 @@ $process_event = $application->GetVar('process_event'); if ($process_event) { - $application->HandleEvent($event, 'ebay-sections:OnNewTokenAccept'); + $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenAccept')); echo 'Success! New Token is Got!'; } else { echo ' @@ -45,7 +45,7 @@ '; } } else { - $application->HandleEvent($event, 'ebay-sections:OnNewTokenAccept'); + $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenAccept')); } $application->Done(); Index: in-auction/new_token_reject.php =================================================================== --- in-auction/new_token_reject.php (revision 15111) +++ in-auction/new_token_reject.php (working copy) @@ -26,7 +26,7 @@ $application->StoreVar('user_id', USER_ROOT); - $application->HandleEvent($event, 'ebay-sections:OnNewTokenReject'); + $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenReject')); echo 'Failure! New Token is not Generated!'; Index: in-auction/notify.php =================================================================== --- in-auction/notify.php (revision 15111) +++ in-auction/notify.php (working copy) @@ -26,7 +26,7 @@ $application->StoreVar('user_id', USER_ROOT); - $application->HandleEvent($event, 'l-ebay:OnStoreToLog'); + $application->HandleEvent(new kEvent('l-ebay:OnStoreToLog')); $application->Done(); Index: in-auction/units/category_listing/category_listing_eh.php =================================================================== --- in-auction/units/category_listing/category_listing_eh.php (revision 15111) +++ in-auction/units/category_listing/category_listing_eh.php (working copy) @@ -41,7 +41,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { // $sql = 'SELECT Prefix // FROM '.TABLE_PREFIX.'ItemTypes @@ -60,7 +60,7 @@ * * @param kEvent $event */ - function OnModifyCategoriesConfig(&$event) + function OnModifyCategoriesConfig($event) { $title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets'); @@ -84,7 +84,7 @@ // * // * @param kEvent $event // */ -// function OnAfterConfigRead(&$event) +// function OnAfterConfigRead($event) // { // // parent::OnAfterConfigRead($event); @@ -93,7 +93,7 @@ // } - function OnCategoriesPreSave(&$event) + function OnCategoriesPreSave($event) { $object =& $event->getObject(); @@ -142,7 +142,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -156,14 +156,14 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); $this->ValidateCategories($event); } - function ValidateCategories(&$event) + function ValidateCategories($event) { $this->ValidateCategoryField($event, 'AuctionPrimaryCategoryId'); $this->ValidateCategoryField($event, 'AuctionSecondaryCategoryId'); @@ -171,7 +171,7 @@ $this->ValidateCategoryField($event, 'StoreSecondaryCategoryId', 1); } - function ValidateCategoryField(&$event, $field, $is_store = 0) + function ValidateCategoryField($event, $field, $is_store = 0) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -212,7 +212,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { $category_id = $this->Application->GetVar('c_id'); @@ -232,7 +232,7 @@ * * @param kEvent $event */ - function OnAfterCategorySave(&$event) + function OnAfterCategorySave($event) { if ($event->MasterEvent->status != kEvent::erSUCCESS) @@ -341,7 +341,7 @@ * * @param kEvent $event */ - function OnAfterProductValidate(&$event) + function OnAfterProductValidate($event) { $Product =& $event->MasterEvent->getObject(); Index: in-auction/units/error_log/error_log_eh.php =================================================================== --- in-auction/units/error_log/error_log_eh.php (revision 15111) +++ in-auction/units/error_log/error_log_eh.php (working copy) @@ -42,7 +42,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -65,7 +65,7 @@ * @return void * @access protected */ - protected function OnDeleteAll(kEvent &$event) + protected function OnDeleteAll(kEvent $event) { if ( !$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; @@ -100,7 +100,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); Index: in-auction/units/helpers/helpers_config.php =================================================================== --- in-auction/units/helpers/helpers_config.php (revision 15111) +++ in-auction/units/helpers/helpers_config.php (working copy) @@ -18,8 +18,8 @@ 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array('pseudo' => 'eBayHelper', 'class' => 'eBayHelper', 'file' => 'ebay_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')), - Array('pseudo' => 'CatSelectHelper', 'class' => 'CatSelectHelper', 'file' => 'catselect_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')), - Array('pseudo' => 'XMLHelper', 'class' => 'XMLHelper', 'file' => 'xml_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')), + Array('pseudo' => 'eBayHelper', 'class' => 'eBayHelper', 'file' => 'ebay_helper.php', 'build_event' => ''), + Array('pseudo' => 'CatSelectHelper', 'class' => 'CatSelectHelper', 'file' => 'catselect_helper.php', 'build_event' => ''), + Array('pseudo' => 'XMLHelper', 'class' => 'XMLHelper', 'file' => 'xml_helper.php', 'build_event' => ''), ), ); \ No newline at end of file Index: in-auction/units/listing/listing_eh.php =================================================================== --- in-auction/units/listing/listing_eh.php (revision 15111) +++ in-auction/units/listing/listing_eh.php (working copy) @@ -50,7 +50,7 @@ * * @param kEvent $event */ - function OnNewListingWindow(&$event) + function OnNewListingWindow($event) { if (!$this->Application->isAdminUser) { return; @@ -100,7 +100,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -164,7 +164,7 @@ * @return void * @access protected */ - protected function OnDeleteAll(kEvent &$event) + protected function OnDeleteAll(kEvent $event) { if ( !$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; @@ -201,7 +201,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -225,7 +225,7 @@ * * @param kEvent $event */ - function OnProcessAddListing(&$event) + function OnProcessAddListing($event) { if (!$this->Application->isAdminUser) { return; @@ -293,7 +293,7 @@ * @param int $product_id * @return Array */ - function getProductFields(&$event, $product_id) + function getProductFields($event, $product_id) { static $items_info = null; @@ -318,7 +318,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $a_ids = $event->getEventParam('ids'); @@ -410,7 +410,7 @@ * @param kEvent $event */ - function OnListItems(&$event) + function OnListItems($event) { // get queued items data if (!$this->Application->isAdmin) { @@ -1065,7 +1065,7 @@ * @param kEvent $event */ - function OnStoreToLog(&$event) + function OnStoreToLog($event) { $eBayHelper =& $this->Application->recallObject('eBayHelper'); @@ -1082,7 +1082,7 @@ * @param kEvent $event */ - function OnArchive(&$event) + function OnArchive($event) { if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -1110,7 +1110,7 @@ * @param kEvent $event */ - function OnEndItem(&$event) + function OnEndItem($event) { if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -1148,7 +1148,7 @@ * @param kEvent $event */ - function OnArchiveAll(&$event) + function OnArchiveAll($event) { if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -1183,7 +1183,7 @@ * * @param kEvent $event */ - function OnHitAuction(&$event) + function OnHitAuction($event) { if ($this->Application->ConfigValue('eBay_UseEbayCounters') == 1) @@ -1210,7 +1210,7 @@ * * @param kEvent $event */ - function OnChangeStatistics(&$event) + function OnChangeStatistics($event) { if (!$this->Application->isAdminUser) { return; @@ -1297,7 +1297,7 @@ * @param kEvent $event */ - function OnPrintChart(&$event) + function OnPrintChart($event) { if (!$this->Application->isAdminUser) { return; @@ -1350,7 +1350,7 @@ } - function OnExportReport(&$event) + function OnExportReport($event) { $a_report = unserialize($this->Application->RecallVar('report_data')); Index: in-auction/units/product_listing/product_listing_eh.php =================================================================== --- in-auction/units/product_listing/product_listing_eh.php (revision 15111) +++ in-auction/units/product_listing/product_listing_eh.php (working copy) @@ -42,7 +42,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { /*$sql = 'SELECT Prefix FROM ' . TABLE_PREFIX . 'ItemTypes @@ -63,7 +63,7 @@ * * @param kEvent $event */ - function OnModifyProductsConfig(&$event) + function OnModifyProductsConfig($event) { $title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets'); @@ -89,7 +89,7 @@ * @param kEvent $event * @access protected */ - protected function OnItemBuild(kEvent &$event) + protected function OnItemBuild(kEvent $event) { parent::OnItemBuild($event); @@ -108,7 +108,7 @@ } } - function OnProductsPreSave(&$event) + function OnProductsPreSave($event) { $object =& $event->getObject(); @@ -166,7 +166,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -180,14 +180,14 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); $this->ValidateCategories($event); } - function ValidateCategories(&$event) + function ValidateCategories($event) { $this->ValidateCategoryField($event, 'AuctionPrimaryCategoryId'); $this->ValidateCategoryField($event, 'AuctionSecondaryCategoryId'); @@ -195,7 +195,7 @@ $this->ValidateCategoryField($event, 'StoreSecondaryCategoryId', 1); } - function ValidateCategoryField(&$event, $field, $is_store = 0) + function ValidateCategoryField($event, $field, $is_store = 0) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -236,7 +236,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { $product_id = $this->Application->GetVar('p_id'); @@ -258,7 +258,7 @@ */ /* - function OnAfterCopyImagesToLive(&$event) + function OnAfterCopyImagesToLive($event) { $id = $event->MasterEvent->getEventParam('id'); $temp_id = $event->MasterEvent->getEventParam('temp_id'); @@ -356,7 +356,7 @@ * * @param kEvent $event */ - function OnGenerateTemplate(&$event) + function OnGenerateTemplate($event) { if (!$this->Application->isAdminUser) { return; Index: in-auction/units/schedule/schedule_eh.php =================================================================== --- in-auction/units/schedule/schedule_eh.php (revision 15111) +++ in-auction/units/schedule/schedule_eh.php (working copy) @@ -40,7 +40,7 @@ * * @param kEvent $event */ - function OnMassDisable(&$event) + function OnMassDisable($event) { $this->SetMassStatus($event, 0); } @@ -50,7 +50,7 @@ * * @param kEvent $event */ - function OnMassEnable(&$event) + function OnMassEnable($event) { $this->SetMassStatus($event, 1); } @@ -61,7 +61,7 @@ * @param kEvent $event * @param int $status */ - function SetMassStatus(&$event, $status) + function SetMassStatus($event, $status) { if (!$this->Application->isAdminUser) { return; Index: in-auction/units/sections/ebay_eh.php =================================================================== --- in-auction/units/sections/ebay_eh.php (revision 15111) +++ in-auction/units/sections/ebay_eh.php (working copy) @@ -45,7 +45,7 @@ * * @param kEvent $event */ - function OnAfterProductConfigRead(&$event) + function OnAfterProductConfigRead($event) { $a_fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields'); @@ -135,7 +135,7 @@ * * @param kEvent $event */ - function OnAfterCategoryConfigRead(&$event) + function OnAfterCategoryConfigRead($event) { $edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets'); $edit_tab_presets['Default']['ebay'] = Array ( @@ -149,7 +149,7 @@ * * @param kEvent $event */ - function OnAfterImageAdded(&$event) + function OnAfterImageAdded($event) { $image =& $event->MasterEvent->getObject(); @@ -219,7 +219,7 @@ * * @param kEvent $event */ - function OnAfterSaveProduct(&$event) + function OnAfterSaveProduct($event) { $temp_handler =& $this->Application->recallObject($event->MasterEvent->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); /* @var $temp_handler kTempTablesHandler */ @@ -258,7 +258,7 @@ * * @param kEvent $event */ - function OnBeforeProductItemCreate(&$event) + function OnBeforeProductItemCreate($event) { $object =& $event->MasterEvent->getObject(); $product_type = $object->GetDBField('Type'); @@ -311,7 +311,7 @@ * @param kEvent $event */ - function OnApproveEbayProduct(&$event) + function OnApproveEbayProduct($event) { // the call of this event is based on Products->ProcessingData // field value @@ -442,7 +442,7 @@ * * @param kEvent $event */ - function OnRefreshStore(&$event) + function OnRefreshStore($event) { if (!$this->Application->isAdminUser) { return; @@ -491,7 +491,7 @@ * * @param kEvent $event */ - function OnTestAddUser(&$event) + function OnTestAddUser($event) { // $this->AddEbayUser('alex-intechnic','110024859878'); @@ -1016,7 +1016,7 @@ * @param kEvent $event */ - function OnRefreshCategories(&$event) + function OnRefreshCategories($event) { if (!$this->Application->isAdminUser) { return; @@ -1391,7 +1391,7 @@ * @param kEvent $event */ - function OnRefreshAttributes(&$event) + function OnRefreshAttributes($event) { ini_set('memory_limit', '200M'); @@ -1590,7 +1590,7 @@ * @param kEvent $event */ - function OnAddListingLog(&$event) + function OnAddListingLog($event) { // read new listing log @@ -2154,7 +2154,7 @@ * and redirect to MyOrders section ? * @param kEvent $event */ - function OnOrderLogin(&$event) + function OnOrderLogin($event) { $key = $this->Application->GetVar('key'); if ($key == '') @@ -2209,7 +2209,7 @@ * * @param kEvent $event */ - function OnBeforeRemoveFromCart(&$event) + function OnBeforeRemoveFromCart($event) { $ord_item_id = $this->Application->GetVar('orditems_id'); @@ -2229,7 +2229,7 @@ * * @param kEvent $event */ - function OnBeforeRecalculateItems(&$event) + function OnBeforeRecalculateItems($event) { if ($this->Application->isAdminUser) { return; @@ -2418,7 +2418,7 @@ * * @param kEvent $event */ - function OnBeforeCompleteOrder(&$event) + function OnBeforeCompleteOrder($event) { $order =& $event->MasterEvent->getObject(); /* @var $order OrdersItem */ @@ -2539,7 +2539,7 @@ } - function OnModifyUsersConfig(&$event) + function OnModifyUsersConfig($event) { $fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields'); $fields['EbayLogin'] = Array ('type' => 'string', 'max_len' => 255, 'default' => NULL); @@ -2595,7 +2595,7 @@ * @param kEvent $event */ - function OnGetSellerList(&$event) + function OnGetSellerList($event) { $a_times = $this->GetRequestInterval('get_list_time', 'eBay_GetSellerListIntervalHours'); if (!$a_times) { @@ -2743,7 +2743,7 @@ * @param kEvent $event */ - function OnSubscribeListingNotifications(&$event) + function OnSubscribeListingNotifications($event) { if (!$this->IsNotifiableServer()) { @@ -2812,7 +2812,7 @@ * @param kEvent $event */ - function OnGetSellerTransactions(&$event) + function OnGetSellerTransactions($event) { $a_times = $this->GetRequestInterval('get_transactions_time', 'eBay_GetSellerTransactionsIntervalHours'); if (!$a_times) { @@ -2940,7 +2940,7 @@ * @param kEvent $event */ - function OnAutoDispute(&$event) + function OnAutoDispute($event) { $dispute_days = $this->Application->ConfigValue('eBay_AutoDisputeDays'); @@ -3091,7 +3091,7 @@ * @param kEvent $event */ - function OnProcessSchedule(&$event) + function OnProcessSchedule($event) { // Get Schedules to run // return; @@ -3267,7 +3267,7 @@ * * @param kEvent $event */ - function OnConfigUpdate(&$event) + function OnConfigUpdate($event) { // save changes in ebay shipping options, made on config template // $object =& $event->getObject(); @@ -3335,7 +3335,7 @@ * * @param kEvent $event */ - function OnDeleteOldHits(&$event) + function OnDeleteOldHits($event) { return; $delay = $this->Application->ConfigValue('eBay_ListingHitsDelayMinutes'); @@ -3354,7 +3354,7 @@ /** * Redirect to error page */ - function OnNewTokenReject(&$event) + function OnNewTokenReject($event) { if (!$this->Application->isAdminUser) { return; @@ -3364,7 +3364,7 @@ /** * Write new token to DB */ - function OnNewTokenAccept(&$event) + function OnNewTokenAccept($event) { if (!$this->Application->isAdminUser) { return; @@ -3409,7 +3409,7 @@ * @param kEvent $event * @return void */ - function OnAuthorizeForToken(&$event) + function OnAuthorizeForToken($event) { if (!$this->Application->isAdminUser) { return; @@ -3472,7 +3472,7 @@ * * @param kEvent $event */ - function OnReviseCheckoutStatuses(&$event) + function OnReviseCheckoutStatuses($event) { // Get all ebay items where order is approved, and CheckoutStatus is 0 @@ -3532,7 +3532,7 @@ * * @param kEvent $event */ - function OnReceiveFeedbacks(&$event) + function OnReceiveFeedbacks($event) { $eBayHelper =& $this->Application->recallObject('eBayHelper'); @@ -3650,7 +3650,7 @@ * * @param kEvent $event */ - function OnSendFeedbacks(&$event) + function OnSendFeedbacks($event) { if ($this->Application->ConfigValue('eBay_EnableFeedback') != 1) @@ -3760,7 +3760,7 @@ * * @param kEvent $event */ - function OnSendFeedbackNotifications(&$event) + function OnSendFeedbackNotifications($event) { if (!$this->Application->ConfigValue('eBay_SendFeedbackNotification')) { @@ -3850,7 +3850,7 @@ * * @param kEvent $event */ - function OnDeleteToken(&$event) + function OnDeleteToken($event) { if (!DEBUG_MODE || !$this->Application->isAdminUser) { return; @@ -3866,7 +3866,7 @@ * * @param kEvent $event */ - function OnSetAPIKeys(&$event) + function OnSetAPIKeys($event) { if (!DEBUG_MODE || !$this->Application->isAdminUser) { return; Index: in-auction/units/shipping/shipping_eh.php =================================================================== --- in-auction/units/shipping/shipping_eh.php (revision 15111) +++ in-auction/units/shipping/shipping_eh.php (working copy) @@ -44,7 +44,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -67,7 +67,7 @@ * * @param kEvent $event */ - function OnConfigUpdate(&$event) + function OnConfigUpdate($event) { if (!$this->Application->isAdminUser) { return; @@ -92,7 +92,7 @@ * * @param kEvent $event */ - function OnAfterParentLoad(&$event) + function OnAfterParentLoad($event) { if (!$this->IsOnEbayTab()) { @@ -154,7 +154,7 @@ * * @param kEvent $event */ - function OnParentPreSave(&$event) + function OnParentPreSave($event) { if (!$this->Application->isAdminUser) { return; @@ -186,7 +186,7 @@ * @return bool * @access protected */ - protected function UseTempTables(kEvent &$event) + protected function UseTempTables(kEvent $event) { if ( $this->IsOnEbayTab() ) { return true; Index: in-bulletin/units/emoticons/emoticon_eh.php =================================================================== --- in-bulletin/units/emoticons/emoticon_eh.php (revision 15111) +++ in-bulletin/units/emoticons/emoticon_eh.php (working copy) @@ -23,7 +23,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); Index: in-bulletin/units/helpers/helpers_config.php =================================================================== --- in-bulletin/units/helpers/helpers_config.php (revision 15111) +++ in-bulletin/units/helpers/helpers_config.php (working copy) @@ -19,6 +19,6 @@ 'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array('pseudo' => 'PostHelper', 'class' => 'PostHelper','file' => 'post_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')), + Array('pseudo' => 'PostHelper', 'class' => 'PostHelper','file' => 'post_helper.php', 'build_event' => ''), ), ); \ No newline at end of file Index: in-bulletin/units/poll_comments/poll_comment_eh.php =================================================================== --- in-bulletin/units/poll_comments/poll_comment_eh.php (revision 15111) +++ in-bulletin/units/poll_comments/poll_comment_eh.php (working copy) @@ -42,7 +42,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -63,7 +63,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -84,7 +84,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { if ( !$this->Application->isAdmin ) { $object =& $event->getObject(); @@ -123,7 +123,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -141,7 +141,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); Index: in-bulletin/units/polls/poll_eh.php =================================================================== --- in-bulletin/units/polls/poll_eh.php (revision 15111) +++ in-bulletin/units/polls/poll_eh.php (working copy) @@ -44,7 +44,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -64,7 +64,7 @@ * * @param kEvent $event */ - function OnResetVotes(&$event) + function OnResetVotes($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -89,7 +89,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -104,7 +104,7 @@ * * @param kEvent $event */ - function OnMakeVote(&$event) + function OnMakeVote($event) { $object =& $event->getObject($this->Application->GetVar('poll_id')); /* @var $object kDBItem */ @@ -157,7 +157,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); Index: in-bulletin/units/posts/post_eh.php =================================================================== --- in-bulletin/units/posts/post_eh.php (revision 15111) +++ in-bulletin/units/posts/post_eh.php (working copy) @@ -23,7 +23,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $events = Array ('OnUpdate', 'OnDelete'); @@ -41,7 +41,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -89,7 +89,7 @@ * @param kEvent $event * @param string $permissions */ - function checkPostPermission(&$event, $permissions) + function checkPostPermission($event, $permissions) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -118,7 +118,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -150,7 +150,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -164,7 +164,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -183,7 +183,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -209,7 +209,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -261,8 +261,7 @@ if ( (int)$auto_lock > 0 ) { if ( $posts_count >= $auto_lock ) { // user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again - $lock_event = new kEvent($parent_prefix . ':OnTopicLockToggle'); - $this->Application->HandleEvent($lock_event); + $this->Application->HandleEvent(new kEvent($parent_prefix . ':OnTopicLockToggle')); } } } @@ -273,7 +272,7 @@ * @param kEvent $event * @param kCatDBItem $main_object */ - function updateTopicInfo(&$event, &$main_object) + function updateTopicInfo($event, &$main_object) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -296,7 +295,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -313,7 +312,7 @@ * @return void * @access protected */ - protected function OnUpdate(kEvent &$event) + protected function OnUpdate(kEvent $event) { parent::OnUpdate($event); @@ -331,7 +330,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -386,7 +385,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -404,7 +403,7 @@ * @return void * @access protected */ - protected function OnDelete(kEvent &$event) + protected function OnDelete(kEvent $event) { parent::OnDelete($event); @@ -421,7 +420,7 @@ * @return void * @access protected */ - protected function OnNew(kEvent &$event) + protected function OnNew(kEvent $event) { parent::OnNew($event); Index: in-bulletin/units/private_message_body/private_message_body_eh.php =================================================================== --- in-bulletin/units/private_message_body/private_message_body_eh.php (revision 15111) +++ in-bulletin/units/private_message_body/private_message_body_eh.php (working copy) @@ -23,7 +23,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -50,7 +50,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); Index: in-bulletin/units/private_messages/private_message_eh.php =================================================================== --- in-bulletin/units/private_messages/private_message_eh.php (revision 15111) +++ in-bulletin/units/private_messages/private_message_eh.php (working copy) @@ -44,7 +44,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -77,7 +77,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -102,7 +102,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -145,7 +145,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -171,7 +171,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -188,7 +188,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -210,7 +210,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -233,7 +233,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -251,7 +251,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -271,7 +271,7 @@ * @return void * @access protected */ - protected function OnNew(kEvent &$event) + protected function OnNew(kEvent $event) { parent::OnNew($event); Index: in-bulletin/units/topics/topics_config.php =================================================================== --- in-bulletin/units/topics/topics_config.php (revision 15111) +++ in-bulletin/units/topics/topics_config.php (working copy) @@ -18,8 +18,8 @@ 'Prefix' => 'bb', 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array ( 1 => 'id', Index: in-bulletin/units/topics/topics_event_handler.php =================================================================== --- in-bulletin/units/topics/topics_event_handler.php (revision 15111) +++ in-bulletin/units/topics/topics_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { if ( $event->Name == 'OnTopicLockToggle' ) { $object =& $event->getObject(); @@ -52,7 +52,7 @@ * * @param kEvent $event */ - function OnToggleLock(&$event) + function OnToggleLock($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -69,7 +69,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -83,7 +83,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -109,7 +109,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -144,7 +144,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -175,7 +175,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -192,7 +192,7 @@ * * @param kEvent $event */ - function OnTopicLockToggle(&$event) + function OnTopicLockToggle($event) { $object =& $event->getObject(); /* @var $object kCatDBItem */ @@ -209,7 +209,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -231,7 +231,7 @@ * @return void * @access protected */ - protected function OnCloneSubItem(kEvent &$event) + protected function OnCloneSubItem(kEvent $event) { parent::OnCloneSubItem($event); Index: in-commerce/gw_notify.php =================================================================== --- in-commerce/gw_notify.php (revision 15111) +++ in-commerce/gw_notify.php (working copy) @@ -54,8 +54,7 @@ if($transaction_status == 1) { - $dummy_var = '10'; - $application->HandleEvent($dummy_var, 'ord:OnCompleteOrder'); + $application->HandleEvent(new kEvent('ord:OnCompleteOrder')); } else { $application->StoreVar('gw_error', $gateway_object->getErrorMsg()); Index: in-commerce/units/addresses/addresses_event_handler.php =================================================================== --- in-commerce/units/addresses/addresses_event_handler.php (revision 15111) +++ in-commerce/units/addresses/addresses_event_handler.php (working copy) @@ -43,7 +43,7 @@ * @return string * @access protected */ - protected function getMainSpecial(kEvent &$event) + protected function getMainSpecial(kEvent $event) { return ''; } @@ -56,7 +56,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -95,7 +95,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -125,7 +125,7 @@ * @return void * @access protected */ - protected function OnUpdate(kEvent &$event) + protected function OnUpdate(kEvent $event) { parent::OnUpdate($event); @@ -139,7 +139,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -153,7 +153,7 @@ * @return void * @access protected */ - protected function setNextTemplate(kEvent &$event) + protected function setNextTemplate(kEvent $event) { if ( $this->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: in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php =================================================================== --- in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (revision 15111) +++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -40,7 +40,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { $object =& $event->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: in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php =================================================================== --- in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (revision 15111) +++ in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (working copy) @@ -25,7 +25,7 @@ * @return void * @access protected */ - protected function prepareObject(&$object, kEvent &$event) + protected function prepareObject(&$object, kEvent $event) { if ( $event->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: in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php =================================================================== --- in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (revision 15111) +++ in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -40,7 +40,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { $object =& $event->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: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php =================================================================== --- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (revision 15111) +++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (working copy) @@ -40,7 +40,7 @@ * * @param kEvent $event */ - function OnMoreBrackets(&$event) + function OnMoreBrackets($event) { $event->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: in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php =================================================================== --- in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 15111) +++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (working copy) @@ -21,7 +21,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { // uses another handler event, because does the same stuff but on different table $di_handler =& $this->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: in-commerce/units/affiliates/affiliates_event_handler.php =================================================================== --- in-commerce/units/affiliates/affiliates_event_handler.php (revision 15111) +++ in-commerce/units/affiliates/affiliates_event_handler.php (working copy) @@ -40,7 +40,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { if ( $event->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: in-commerce/units/brackets/brackets_event_handler.php =================================================================== --- in-commerce/units/brackets/brackets_event_handler.php (revision 15111) +++ in-commerce/units/brackets/brackets_event_handler.php (working copy) @@ -45,7 +45,7 @@ * @return void * @access protected */ - protected function prepareObject(&$object, kEvent &$event) + protected function prepareObject(&$object, kEvent $event) { if ( $this->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: in-commerce/units/coupon_items/coupon_items_event_handler.php =================================================================== --- in-commerce/units/coupon_items/coupon_items_event_handler.php (revision 15111) +++ in-commerce/units/coupon_items/coupon_items_event_handler.php (working copy) @@ -38,7 +38,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { // uses another handler event, because does the same stuff but on different table $di_handler =& $this->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: in-commerce/units/coupons/coupons_event_handler.php =================================================================== --- in-commerce/units/coupons/coupons_event_handler.php (revision 15111) +++ in-commerce/units/coupons/coupons_event_handler.php (working copy) @@ -40,7 +40,7 @@ * * @param kEvent $event */ - function OnPrepareClone(&$event) + function OnPrepareClone($event) { $this->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: in-commerce/units/currencies/currencies_event_handler.php =================================================================== --- in-commerce/units/currencies/currencies_event_handler.php (revision 15111) +++ in-commerce/units/currencies/currencies_event_handler.php (working copy) @@ -51,7 +51,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( $event->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: in-commerce/units/destinations/dst_event_handler.php =================================================================== --- in-commerce/units/destinations/dst_event_handler.php (revision 15111) +++ in-commerce/units/destinations/dst_event_handler.php (working copy) @@ -22,7 +22,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 */ @@ -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: in-commerce/units/discount_items/discount_items_event_handler.php =================================================================== --- in-commerce/units/discount_items/discount_items_event_handler.php (revision 15111) +++ in-commerce/units/discount_items/discount_items_event_handler.php (working copy) @@ -38,7 +38,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $object =& $event->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: in-commerce/units/discounts/discounts_event_handler.php =================================================================== --- in-commerce/units/discounts/discounts_event_handler.php (revision 15111) +++ in-commerce/units/discounts/discounts_event_handler.php (working copy) @@ -22,7 +22,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -36,7 +36,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -48,7 +48,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->getObject(); /* @var $object kDBItem */ Index: in-commerce/units/downloads/downloads_config.php =================================================================== --- in-commerce/units/downloads/downloads_config.php (revision 15111) +++ in-commerce/units/downloads/downloads_config.php (working copy) @@ -21,7 +21,7 @@ 'TagProcessorClass' => 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: in-commerce/units/files/files_event_handler.php =================================================================== --- in-commerce/units/files/files_event_handler.php (revision 15111) +++ in-commerce/units/files/files_event_handler.php (working copy) @@ -22,7 +22,7 @@ * @return string * @access protected */ - protected function getMainSpecial(kEvent &$event) + protected function getMainSpecial(kEvent $event) { if ( $event->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: in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php =================================================================== --- in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (revision 15111) +++ in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (working copy) @@ -43,9 +43,8 @@ $order->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: in-commerce/units/gateways/gw_classes/paypal.php =================================================================== --- in-commerce/units/gateways/gw_classes/paypal.php (revision 15111) +++ in-commerce/units/gateways/gw_classes/paypal.php (working copy) @@ -195,7 +195,7 @@ break; case 'subscr_payment': $field_values = $this->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: in-commerce/units/gateways/gw_event_handler.php =================================================================== --- in-commerce/units/gateways/gw_event_handler.php (revision 15111) +++ in-commerce/units/gateways/gw_event_handler.php (working copy) @@ -15,7 +15,7 @@ class GatewayEventHandler extends kDBEventHandler { - function OnSaveValues(&$event) + function OnSaveValues($event) { // if there is no id - it means we need to create an item $item_id = $this->getPassedID($event); @@ -56,7 +56,7 @@ } } - protected function OnCheckGateways(&$event) + protected function OnCheckGateways($event) { if ( !$this->Application->isAdminUser ) { return; Index: in-commerce/units/gift_certificates/gift_certificates_eh.php =================================================================== --- in-commerce/units/gift_certificates/gift_certificates_eh.php (revision 15111) +++ in-commerce/units/gift_certificates/gift_certificates_eh.php (working copy) @@ -42,7 +42,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::OnPreCreate($event); @@ -65,7 +65,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -79,7 +79,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -96,7 +96,7 @@ * * @param kEvent $event */ - function itemChanged(&$event) + function itemChanged($event) { $object =& $event->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: in-commerce/units/helpers/helpers_config.php =================================================================== --- in-commerce/units/helpers/helpers_config.php (revision 15111) +++ in-commerce/units/helpers/helpers_config.php (working copy) @@ -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: in-commerce/units/manufacturers/manufacturers_event_handler.php =================================================================== --- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 15111) +++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy) @@ -41,7 +41,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -89,7 +89,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -106,7 +106,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -124,7 +124,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); Index: in-commerce/units/order_items/order_items_event_handler.php =================================================================== --- in-commerce/units/order_items/order_items_event_handler.php (revision 15111) +++ in-commerce/units/order_items/order_items_event_handler.php (working copy) @@ -39,7 +39,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $object =& $event->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: in-commerce/units/orders/order_validator.php =================================================================== --- in-commerce/units/orders/order_validator.php (revision 15111) +++ in-commerce/units/orders/order_validator.php (working copy) @@ -15,9 +15,9 @@ class OrderValidator extends kValidator { - public function __construct($application = null) + public function __construct() { - parent::__construct($application); + parent::__construct(); $this->ErrorMsgs['credit_card_validation_error'] = '!lu_cc_validation_error!'; $this->ErrorMsgs['credit_card_expired'] = '!lu_cc_expired!'; Index: in-commerce/units/orders/orders_config.php =================================================================== --- in-commerce/units/orders/orders_config.php (revision 15111) +++ in-commerce/units/orders/orders_config.php (working copy) @@ -26,7 +26,7 @@ 'RegisterClasses' => 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: in-commerce/units/orders/orders_event_handler.php =================================================================== --- in-commerce/units/orders/orders_event_handler.php (revision 15111) +++ in-commerce/units/orders/orders_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { if ( !$this->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,7 +1315,7 @@ $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); @@ -1323,7 +1323,7 @@ $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,7 +3047,7 @@ $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')); } /** @@ -3056,7 +3055,7 @@ * * @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,7 +3330,7 @@ $this->UpdateTotals($event); } - function UpdateTotals(&$event) + function UpdateTotals($event) { $object =& $event->getObject(); /* @var $object OrdersItem */ @@ -3339,7 +3338,7 @@ $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: in-commerce/units/orders/orders_item.php =================================================================== --- in-commerce/units/orders/orders_item.php (revision 15111) +++ in-commerce/units/orders/orders_item.php (working copy) @@ -279,7 +279,7 @@ } // ===== Gift Certificates Related ===== - function RecalculateGift(&$event) + function RecalculateGift($event) { $gc_id = $this->GetDBField('GiftCertificateId'); if ($gc_id < 1) { Index: in-commerce/units/payment_type/payment_type_event_handler.php =================================================================== --- in-commerce/units/payment_type/payment_type_event_handler.php (revision 15111) +++ in-commerce/units/payment_type/payment_type_event_handler.php (working copy) @@ -59,7 +59,7 @@ * * @param kEvent $event */ - function OnSetPrimary(&$event) + function OnSetPrimary($event) { $object =& $event->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: in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php =================================================================== --- in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (revision 15111) +++ in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (working copy) @@ -22,7 +22,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { $currency_id_list = $this->Application->GetVar('currency_list'); Index: in-commerce/units/pricing/pricing_event_handler.php =================================================================== --- in-commerce/units/pricing/pricing_event_handler.php (revision 15111) +++ in-commerce/units/pricing/pricing_event_handler.php (working copy) @@ -60,7 +60,7 @@ $this->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: in-commerce/units/product_option_combinations/product_option_combinations_config.php =================================================================== --- in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 15111) +++ in-commerce/units/product_option_combinations/product_option_combinations_config.php (working copy) @@ -20,8 +20,8 @@ 'EventHandlerClass' => 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: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php =================================================================== --- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 15111) +++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $type == 'after' ) { return; @@ -61,7 +61,7 @@ * * @param kEvent $event */ - function GetOptionValues(&$event, $option_id) + function GetOptionValues($event, $option_id) { $object =& $event->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: in-commerce/units/product_options/product_options_event_handler.php =================================================================== --- in-commerce/units/product_options/product_options_event_handler.php (revision 15111) +++ in-commerce/units/product_options/product_options_event_handler.php (working copy) @@ -23,7 +23,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -46,7 +46,7 @@ * @return void * @access protected */ - protected function OnAfterCopyToLive(kEvent &$event) + protected function OnAfterCopyToLive(kEvent $event) { parent::OnAfterCopyToLive($event); @@ -90,7 +90,7 @@ * @return void * @access protected */ - protected function OnAfterClone(kEvent &$event) + protected function OnAfterClone(kEvent $event) { parent::OnAfterClone($event); Index: in-commerce/units/products/products_config.php =================================================================== --- in-commerce/units/products/products_config.php (revision 15111) +++ in-commerce/units/products/products_config.php (working copy) @@ -15,10 +15,10 @@ $config = Array ( 'Prefix' => '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: in-commerce/units/products/products_event_handler.php =================================================================== --- in-commerce/units/products/products_event_handler.php (revision 15111) +++ in-commerce/units/products/products_event_handler.php (working copy) @@ -76,7 +76,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -105,7 +105,7 @@ * @param kEvent $event * @access private */ - function InventoryAction(&$event) + function InventoryAction($event) { $object =& $event->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: in-commerce/units/reports/reports_event_handler.php =================================================================== --- in-commerce/units/reports/reports_event_handler.php (revision 15111) +++ in-commerce/units/reports/reports_event_handler.php (working copy) @@ -39,7 +39,7 @@ $this->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: in-commerce/units/sections/section_eh.php =================================================================== --- in-commerce/units/sections/section_eh.php (revision 15111) +++ in-commerce/units/sections/section_eh.php (working copy) @@ -20,7 +20,7 @@ * * @param kEvent $event */ - function OnModifySiteDomainConfig(&$event) + function OnModifySiteDomainConfig($event) { $edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets'); $edit_tab_presets['Default']['in-commerce'] = Array ( Index: in-commerce/units/shipping/shipping_event_handler.php =================================================================== --- in-commerce/units/shipping/shipping_event_handler.php (revision 15111) +++ in-commerce/units/shipping/shipping_event_handler.php (working copy) @@ -41,7 +41,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -76,7 +76,7 @@ * @param kEvent $event * @return unknown */ - function OnApplyModifier(&$event) + function OnApplyModifier($event) { $cost_object =& $this->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: in-commerce/units/shipping_costs/shipping_costs_event_handler.php =================================================================== --- in-commerce/units/shipping_costs/shipping_costs_event_handler.php (revision 15111) +++ in-commerce/units/shipping_costs/shipping_costs_event_handler.php (working copy) @@ -42,7 +42,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 */ @@ -87,9 +87,9 @@ * * @param kEvent $event */ - function OnPropagate(&$event) + function OnPropagate($event) { - // $this->OnCreate(&$event); + // $this->OnCreate($event); $object =& $event->getObject(); @@ -158,11 +158,9 @@ } } - /* $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);*/ } /** @@ -170,7 +168,7 @@ * * @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: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php =================================================================== --- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 15111) +++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy) @@ -22,7 +22,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -72,7 +72,7 @@ * @return void * @access protected */ - protected function iterateItems(kEvent &$event) + protected function iterateItems(kEvent $event) { parent::iterateItems($event); @@ -89,7 +89,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -110,7 +110,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -124,7 +124,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -138,7 +138,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); Index: in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php =================================================================== --- in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 15111) +++ in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (working copy) @@ -21,10 +21,10 @@ 'TagProcessorClass' => 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: in-commerce/units/taxes/taxes_event_handler.php =================================================================== --- in-commerce/units/taxes/taxes_event_handler.php (revision 15111) +++ in-commerce/units/taxes/taxes_event_handler.php (working copy) @@ -64,7 +64,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { $zone_object =& $event->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: in-commerce/units/taxesdestinations/taxes_dst_event_handler.php =================================================================== --- in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (revision 15111) +++ in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (working copy) @@ -20,7 +20,7 @@ * * @param kEvent $event */ - function OnSaveDestinations(&$event) + function OnSaveDestinations($event) { $object =& $event->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: in-commerce/units/zones/zones_event_handler.php =================================================================== --- in-commerce/units/zones/zones_event_handler.php (revision 15111) +++ in-commerce/units/zones/zones_event_handler.php (working copy) @@ -64,7 +64,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { $zone_object =& $event->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: in-link/units/helpers/helpers_config.php =================================================================== --- in-link/units/helpers/helpers_config.php (revision 15111) +++ in-link/units/helpers/helpers_config.php (working copy) @@ -19,6 +19,6 @@ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'), 'RegisterClasses' => Array ( - Array ('pseudo' => 'LinkHelper', 'class' => 'LinkHelper', 'file' => 'link_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'), + Array ('pseudo' => 'LinkHelper', 'class' => 'LinkHelper', 'file' => 'link_helper.php', 'build_event' => ''), ), ); \ No newline at end of file Index: in-link/units/l-visits/l-visit_eh.php =================================================================== --- in-link/units/l-visits/l-visit_eh.php (revision 15111) +++ in-link/units/l-visits/l-visit_eh.php (working copy) @@ -21,7 +21,7 @@ * * @param kEvent $event */ - function OnDeleteVisits(&$event) + function OnDeleteVisits($event) { $key_field = $event->MasterEvent->Prefix == 'u' ? 'PortalUserId' : 'ResourceId'; $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName'); Index: in-link/units/link_validation/link_validation_eh.php =================================================================== --- in-link/units/link_validation/link_validation_eh.php (revision 15111) +++ in-link/units/link_validation/link_validation_eh.php (working copy) @@ -66,7 +66,7 @@ * @return bool * @access public */ - public function CheckPermission(kEvent &$event) + public function CheckPermission(kEvent $event) { $check_events = Array ('OnApproveLinks', 'OnDeclineLinks', 'OnDeleteLinks'); @@ -107,7 +107,7 @@ * @return void * @access protected */ - protected function prepareObject(&$object, kEvent &$event) + protected function prepareObject(&$object, kEvent $event) { parent::prepareObject($object, $event); @@ -122,7 +122,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -141,7 +141,7 @@ * * @param kEvent $event */ - function OnRestartValidation(&$event) + function OnRestartValidation($event) { $this->_resetValidation($event); @@ -153,7 +153,7 @@ * * @param kEvent $event */ - function _resetValidation(&$event) + function _resetValidation($event) { // 1. delete previous validation results $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' @@ -173,7 +173,7 @@ * * @param kEvent $event */ - function OnValidateSelected(&$event) + function OnValidateSelected($event) { $link_ids = $this->_getSelectedIds($event); if (!$link_ids) { @@ -195,7 +195,7 @@ * * @param kEvent $event */ - function OnContinueValidation(&$event) + function OnContinueValidation($event) { $have_data = $this->_prepareValidation($event); if ($have_data) { @@ -209,7 +209,7 @@ * @param kEvent $event * @param bool $from_ajax */ - function _validate(&$event, $from_ajax = true) + function _validate($event, $from_ajax = true) { $validation_data = unserialize( $this->Application->RecallVar($event->Prefix . '_status') ); @@ -253,7 +253,7 @@ * * @param kEvent $event */ - function OnValidateProgress(&$event) + function OnValidateProgress($event) { $done = $this->_validate($event, true); @@ -362,7 +362,7 @@ * * @param kEvent $event */ - function OnCancelValidation(&$event) + function OnCancelValidation($event) { $this->Application->RemoveVar($event->Prefix . '_status'); } @@ -372,7 +372,7 @@ * * @param kEvent $event */ - function OnResetValidationStatus(&$event) + function OnResetValidationStatus($event) { $ids = $this->_getSelectedIds($event, true); if (!$ids) { @@ -392,7 +392,7 @@ * @param bool $transform convert link ids to link validation ids * @return Array */ - function _getSelectedIds(&$event, $transform = false) + function _getSelectedIds($event, $transform = false) { $ids = Array(); @@ -423,7 +423,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; @@ -465,7 +465,7 @@ * * @param kEvent $event */ - function OnDeleteLinks(&$event) + function OnDeleteLinks($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -488,7 +488,7 @@ * * @param kEvent $event */ - function OnPrepareLinkEditing(&$event) + function OnPrepareLinkEditing($event) { // hook to OnAfterConfigRead instead of OnEdit, because fake ids should be available in CheckPermission if ($this->Application->GetVar('l_event') != 'OnEdit') { @@ -513,7 +513,7 @@ * * @return bool */ - function _prepareValidation(&$event) + function _prepareValidation($event) { // 2. get ids of all links and put them into validation queue $id_field = $this->Application->getUnitOption('l', 'IDField'); @@ -540,7 +540,7 @@ * * @param kEvent $event */ - function OnCronValidation(&$event) + function OnCronValidation($event) { $this->_resetValidation($event); // remove this for continuing to non validated before links @@ -559,7 +559,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: in-link/units/links/links_config.php =================================================================== --- in-link/units/links/links_config.php (revision 15111) +++ in-link/units/links/links_config.php (working copy) @@ -18,8 +18,8 @@ 'Prefix' => 'l', 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'ConfigPriority' => 0, Index: in-link/units/links/links_event_handler.php =================================================================== --- in-link/units/links/links_event_handler.php (revision 15111) +++ in-link/units/links/links_event_handler.php (working copy) @@ -46,7 +46,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -93,7 +93,7 @@ * * @param kEvent $event */ - function OnSetGrouping(&$event) + function OnSetGrouping($event) { $this->Application->LinkVar($event->getPrefixSpecial(true).'_dupe_fields', $event->getPrefixSpecial().'_dupe_fields'); } @@ -103,7 +103,7 @@ * * @param kEvent $event */ - function OnMerge(&$event) + function OnMerge($event) { $link_helper =& $this->Application->recallObject('LinkHelper'); /* @var $link_helper LinkHelper */ @@ -194,7 +194,7 @@ * @return void * @access protected */ - protected function OnStoreSelected(kEvent &$event) + protected function OnStoreSelected(kEvent $event) { $this->StoreSelectedIDs($event); @@ -208,7 +208,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -241,7 +241,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -274,7 +274,7 @@ * * @param kEvent $event */ - function OnContactFormSubmit(&$event) + function OnContactFormSubmit($event) { $fields = Array ( 'ContactFormFullName', 'ContactFormEmail', 'ContactFormSubject', 'ContactFormBody', 'ContactFormCaptcha' @@ -357,7 +357,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -371,7 +371,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -383,7 +383,7 @@ * * @param kEvent $event */ - function _checkLink(&$event) + function _checkLink($event) { if (!$this->Application->ConfigValue('ReciprocalLinkChecking')) { return ; @@ -413,7 +413,7 @@ * * @param kEvent $event */ - function OnProcessReciprocalLinks(&$event) + function OnProcessReciprocalLinks($event) { if ( !$this->Application->ConfigValue('ReciprocalLinkChecking') ) { return; @@ -481,7 +481,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { $id = parent::getPassedID($event); @@ -522,7 +522,7 @@ * @return void * @access protected */ - protected function OnCloneSubItem(kEvent &$event) + protected function OnCloneSubItem(kEvent $event) { parent::OnCloneSubItem($event); @@ -553,7 +553,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteOriginal(kEvent &$event) + protected function OnBeforeDeleteOriginal(kEvent $event) { parent::OnBeforeDeleteOriginal($event); @@ -579,7 +579,7 @@ * @return void * @access protected */ - protected function OnAfterDeleteOriginal(kEvent &$event) + protected function OnAfterDeleteOriginal(kEvent $event) { parent::OnAfterDeleteOriginal($event); Index: in-link/units/listing_types/listing_types_event_handler.php =================================================================== --- in-link/units/listing_types/listing_types_event_handler.php (revision 15111) +++ in-link/units/listing_types/listing_types_event_handler.php (working copy) @@ -39,7 +39,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $object =& $event->getObject(); $selected_ids = $this->Application->GetVar('selected_ids'); @@ -52,7 +52,7 @@ } - function OnPreSaveListingType(&$event) + function OnPreSaveListingType($event) { $event->redirect = false; $object =& $event->getObject( Array('skip_autoload' => true) ); @@ -69,7 +69,7 @@ * @return void * @access protected */ - protected function OnEdit(kEvent &$event) + protected function OnEdit(kEvent $event) { if ( $this->Application->prefixRegistred('p') ) { $this->Application->recallObject('p', null, Array ('skip_autoload' => true)); @@ -85,7 +85,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); Index: in-link/units/listings/listings_event_handler.php =================================================================== --- in-link/units/listings/listings_event_handler.php (revision 15111) +++ in-link/units/listings/listings_event_handler.php (working copy) @@ -42,7 +42,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $object =& $event->getObject(); @@ -62,7 +62,7 @@ $this->finalizePopup($event); } - function OnPreSaveListing(&$event) + function OnPreSaveListing($event) { $event->redirect=false; $object =& $event->getObject( Array('skip_autoload' => true) ); @@ -80,7 +80,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -97,7 +97,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -118,7 +118,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -269,7 +269,7 @@ * * @param kEvent $event */ - function OnRequestEnhancement(&$event) + function OnRequestEnhancement($event) { if ($this->Application->isModuleEnabled('In-Commerce')) { $l_info = $this->Application->GetVar('l'); @@ -303,7 +303,7 @@ * * @param kEvent $event */ - function OnListingCreate(&$event) + function OnListingCreate($event) { $new_processing = false; $link_id = $listing_type_id = 0; @@ -433,7 +433,7 @@ * * @param kEvent $event */ - function EnhancedLinkOnCompleteOrder(&$event) + function EnhancedLinkOnCompleteOrder($event) { // create enhancement, but pending $this->OnListingCreate($event); @@ -456,7 +456,7 @@ * * @param kEvent $event */ - function EnhanceLinkAfterOrderApprove(&$event) + function EnhanceLinkAfterOrderApprove($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); /* @var $object kDBItem */ @@ -493,7 +493,7 @@ * * @param kEvent $event */ - function EnhanceLinkAfterOrderDeny(&$event) + function EnhanceLinkAfterOrderDeny($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); $fields = $event->getEventParam('field_values'); @@ -509,7 +509,7 @@ * * @param kEvent $event */ - function ExpireLink(&$event) + function ExpireLink($event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -541,7 +541,7 @@ * @return void * @access protected */ - protected function iterateItems(kEvent &$event) + protected function iterateItems(kEvent $event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -635,7 +635,7 @@ * @return void * @access protected */ - protected function OnCancel(kEvent &$event) + protected function OnCancel(kEvent $event) { parent::OnCancel($event); @@ -651,7 +651,7 @@ * @param kEvent $event * @return mixed */ - function verifyListingOwner(&$event) + function verifyListingOwner($event) { $link_id = $this->Application->GetVar('l_id'); $user_id = $this->Application->RecallVar('user_id'); @@ -672,7 +672,7 @@ return $this->Conn->GetOne($sql); } - function OnExtendEnhancement(&$event) + function OnExtendEnhancement($event) { $listing_id = $this->verifyListingOwner($event); if (!$listing_id) { @@ -697,7 +697,7 @@ * * @param kEvent $event */ - function OnCancelEnhancement(&$event) + function OnCancelEnhancement($event) { $listing_id = $this->verifyListingOwner($event); if ( !$listing_id ) { @@ -727,7 +727,7 @@ * * @param kEvent $event */ - function OnCheckExpiredPaidListings(&$event) + function OnCheckExpiredPaidListings($event) { $sql = 'SELECT ListingId FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').' WHERE ExpiresOn < '.adodb_mktime().' AND Status = 1'; @@ -784,7 +784,7 @@ * @return void * @access protected */ - protected function OnMassDelete(kEvent &$event) + protected function OnMassDelete(kEvent $event) { $object =& $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ @@ -807,7 +807,7 @@ * * @param kEvent $event */ - function OnMoveEnhancement(&$event) + function OnMoveEnhancement($event) { $id_field = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'IDField'); $item_table_name = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TableName'); @@ -834,7 +834,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); Index: in-news/units/articles/articles_config.php =================================================================== --- in-news/units/articles/articles_config.php (revision 15111) +++ in-news/units/articles/articles_config.php (working copy) @@ -19,8 +19,8 @@ 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'ConfigPriority' => 0, Index: in-news/units/articles/articles_event_handler.php =================================================================== --- in-news/units/articles/articles_event_handler.php (revision 15111) +++ in-news/units/articles/articles_event_handler.php (working copy) @@ -24,7 +24,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -43,7 +43,7 @@ * @param kEvent $event * @return Array */ - function getTypeClauses(&$event) + function getTypeClauses($event) { $type_clauses = parent::getTypeClauses($event); @@ -64,7 +64,7 @@ * * @param kEvent $event */ - function OnUpdateRSSArticles(&$event) + function OnUpdateRSSArticles($event) { if ( defined('IS_INSTALL') && IS_INSTALL ) { return; @@ -148,7 +148,7 @@ * @param kEvent $event * @return Array */ - function getFeedArticles(&$event) + function getFeedArticles($event) { $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); @@ -168,7 +168,7 @@ * * @param kEvent $event */ - function parseFeed(&$event) + function parseFeed($event) { $source_urls = explode(',', $event->getEventParam('source_url')); if (count($source_urls) > 1) { @@ -262,7 +262,7 @@ * @param kXMLNode $root_node * @param kEvent $event */ - function parseRssFeed(&$root_node, &$event) + function parseRssFeed(&$root_node, $event) { $current_node = $root_node->firstChild; $feed_articles = $this->getFeedArticles($event); @@ -350,7 +350,7 @@ * @param kXMLNode $root_node * @param kEvent $event */ - function parseAtomFeed(&$root_node, &$event) + function parseAtomFeed(&$root_node, $event) { $current_node = $root_node->firstChild; $feed_articles = $this->getFeedArticles($event); @@ -426,7 +426,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -441,7 +441,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -454,7 +454,7 @@ * * @param kEvent $event */ - function createExcerpt(&$event) + function createExcerpt($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -497,7 +497,7 @@ * * @param kEvent $event */ - function OnUpdateCategoryCustomFields(&$event) + function OnUpdateCategoryCustomFields($event) { $new_virtual_fields = Array( 'cust_RssSource' => Array('type' => 'string', 'default' => ''), @@ -523,7 +523,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::OnPreCreate($event); @@ -549,7 +549,7 @@ * @return void * @access protected */ - protected function OnCloneSubItem(kEvent &$event) + protected function OnCloneSubItem(kEvent $event) { parent::OnCloneSubItem($event);