Index: branches/5.2.x/units/products/products_event_handler.php =================================================================== diff -u -N -r15072 -r15134 --- branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15072) +++ branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15134) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ @@ -224,7 +224,7 @@ $this->modifyInventory($action, $product, $qty, $combination_id); } - function RunScheduledInventoryActions(&$event) + function RunScheduledInventoryActions($event) { $inv_actions = $this->Application->GetVar('inventory_actions'); if (!$inv_actions) { @@ -315,7 +315,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -348,7 +348,7 @@ * @return void * @access protected */ - protected function clearSelectedIDs(kEvent &$event) + protected function clearSelectedIDs(kEvent $event) { parent::clearSelectedIDs($event); @@ -364,7 +364,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { parent::OnSave($event); @@ -382,7 +382,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { parent::onPreCreate($event); @@ -401,7 +401,7 @@ * @return void * @access protected */ - protected function OnPreSaveAndGo(kEvent &$event) + protected function OnPreSaveAndGo(kEvent $event) { $event->CallSubEvent('OnPreSave'); $this->LoadItem($event); @@ -494,7 +494,7 @@ * @param kEvent $event * @return Array */ - function getTypeClauses(&$event) + function getTypeClauses($event) { $types = $event->getEventParam('types'); $types = $types ? explode(',', $types) : Array (); @@ -668,7 +668,7 @@ return $type_clauses; } - function OnClearRecent(&$event) + function OnClearRecent($event) { $this->Application->RemoveVar('recent_products'); } @@ -678,7 +678,7 @@ * * @param kEvent $event */ - function OnRateProduct(&$event) + function OnRateProduct($event) { $event->SetRedirectParam('pass', 'all,p'); $event->redirect = $this->Application->GetVar('success_template'); @@ -739,7 +739,7 @@ * * @param kEvent $event */ - function OnCancelAction(&$event) + function OnCancelAction($event) { $event->SetRedirectParam('pass', 'all,p'); $event->redirect = $this->Application->GetVar('cancel_template'); @@ -750,7 +750,7 @@ * * @param kEvent $event */ - function OnRecommendProduct(&$event) + function OnRecommendProduct($event) { // used for error reporting only -> rewrite code + theme (by Alex) $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too @@ -797,7 +797,7 @@ * * @param kEvent $event */ - function OnSaveVirtualProduct(&$event) + function OnSaveVirtualProduct($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true)); @@ -861,7 +861,7 @@ * * @param kEvent $event */ - function OnDeleteListingType(&$event) + function OnDeleteListingType($event) { $listing_type =& $event->MasterEvent->getObject(); /* @var $listing_type kDBItem */ @@ -879,7 +879,7 @@ * * @param kEvent $event */ - function OnSubscriptionApprove(&$event) + function OnSubscriptionApprove($event) { $field_values = $event->getEventParam('field_values'); $item_data = unserialize($field_values['ItemData']); @@ -932,7 +932,7 @@ $sub_order->SetDBField('NextCharge_time', $expire); } - function OnDownloadableApprove(&$event) + function OnDownloadableApprove($event) { $field_values = $event->getEventParam('field_values'); $product_id = $field_values['ProductId']; @@ -943,7 +943,7 @@ $this->Conn->Query($sql); } - function OnPackageApprove(&$event){ + function OnPackageApprove($event){ $field_values = $event->getEventParam('field_values'); $item_data = unserialize($field_values['ItemData']); $package_content_ids = $item_data['PackageContent']; @@ -986,7 +986,7 @@ * @return void * @access protected */ - protected function OnPreSave(kEvent &$event) + protected function OnPreSave(kEvent $event) { $this->CheckRequiredOptions($event); @@ -1000,7 +1000,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -1014,7 +1014,7 @@ * @return void * @access protected */ - protected function OnAfterItemUpdate(kEvent &$event) + protected function OnAfterItemUpdate(kEvent $event) { parent::OnAfterItemUpdate($event); @@ -1026,7 +1026,7 @@ * * @param kEvent $event */ - function _updateProductPrice(&$event) + function _updateProductPrice($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -1042,7 +1042,7 @@ } } - function CheckRequiredOptions(&$event) + function CheckRequiredOptions($event) { $object =& $event->getObject(); if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created @@ -1103,7 +1103,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -1130,7 +1130,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -1160,7 +1160,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $dst_field = $this->Application->RecallVar('dst_field'); @@ -1185,7 +1185,7 @@ * * @param kEvent $event */ - function OnAddToPackage(&$event) + function OnAddToPackage($event) { $selected_ids = $this->Application->GetVar('selected_ids'); @@ -1217,7 +1217,7 @@ } - function ProcessPackageItems(&$event) + function ProcessPackageItems($event) { //$this->Application->SetVar('p_mode', 't'); @@ -1271,7 +1271,7 @@ * @param kEvent $event */ - function OnSaveItems(&$event) + function OnSaveItems($event) { //$event->CallSubEvent('OnUpdate'); $event->redirect = false; @@ -1283,7 +1283,7 @@ * * @param kEvent $event */ - function OnRemovePackageItem(&$event) { + function OnRemovePackageItem($event) { $this->Application->SetVar('p_mode', 't'); @@ -1318,7 +1318,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -1342,7 +1342,7 @@ * @return Array * @access protected */ - public function getCustomExportColumns(kEvent &$event) + public function getCustomExportColumns(kEvent $event) { $columns = parent::getCustomExportColumns($event); @@ -1359,7 +1359,7 @@ * * @param kEvent $event */ - function setCustomExportColumns(&$event) + function setCustomExportColumns($event) { parent::setCustomExportColumns($event); @@ -1369,7 +1369,7 @@ $this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array ('Cost' => (double)$object->GetDBField('Cost'))); } - function OnPreSaveAndOpenPopup(&$event) + function OnPreSaveAndOpenPopup($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -1395,7 +1395,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( $this->Application->isAdminUser ) { $event->setEventParam('raise_warnings', 0); @@ -1427,7 +1427,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -1464,7 +1464,7 @@ * @return void * @access protected */ - protected function OnEdit(kEvent &$event) + protected function OnEdit(kEvent $event) { $this->Application->RemoveVar('inventory_actions'); @@ -1476,7 +1476,7 @@ * * @param kEvent $event */ - function OnModifyPaidListingConfig(&$event) + function OnModifyPaidListingConfig($event) { $edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets'); $edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2); @@ -1490,7 +1490,7 @@ * @return void * @access protected */ - protected function OnCloneSubItem(kEvent &$event) + protected function OnCloneSubItem(kEvent $event) { parent::OnCloneSubItem($event); @@ -1516,7 +1516,7 @@ * @return void * @access protected */ - protected function OnAddToCompare(kEvent &$event) + protected function OnAddToCompare(kEvent $event) { $products = $this->getCompareProducts(); $product_id = (int)$this->Application->GetVar($event->Prefix . '_id'); @@ -1545,7 +1545,7 @@ * @return void * @access protected */ - protected function OnRemoveFromCompare(kEvent &$event) + protected function OnRemoveFromCompare(kEvent $event) { $products = $this->getCompareProducts(); @@ -1568,7 +1568,7 @@ * @return void * @access protected */ - protected function OnCancelCompare(kEvent &$event) + protected function OnCancelCompare(kEvent $event) { $this->Application->Session->SetCookie('compare_products', '', -1);