Index: branches/5.2.x/units/products/products_event_handler.php =================================================================== diff -u -N -r15134 -r15141 --- branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15134) +++ branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15141) @@ -1,6 +1,6 @@ GetDBField('InventoryStatus') == 2) { // save inventory changes to option combination instead of product - $object =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true)); + $object = $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true)); $object->Load($combination_id); } elseif ($combination_id > 0) { @@ -217,7 +217,7 @@ function RealInventoryAction($action, $prod_id, $qty, $combination_id) { - $product =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true)); + $product = $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true)); $product->SwitchToLive(); $product->Load($prod_id); @@ -240,7 +240,7 @@ $products = array_unique($products); if ($products) { - $product_obj =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true)); + $product_obj = $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true)); $product_obj->SwitchToLive(); foreach ($products as $product_key) { list($prod_id, $combination_id) = explode('_', $product_key); @@ -291,7 +291,7 @@ if (!$orders) return; - $order =& $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true)); + $order = $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true)); foreach ($orders as $ord_id) { $order->Load($ord_id); @@ -319,7 +319,7 @@ { parent::OnBeforeDeleteFromLive($event); - $product =& $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true)); + $product = $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true)); /* @var $product kCatDBItem */ $product->SwitchToLive(); @@ -330,7 +330,7 @@ return ; } - $temp =& $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true)); + $temp = $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true)); /* @var $temp kCatDBItem */ $temp->SwitchToTemp(); @@ -639,7 +639,7 @@ $object->removeFilter('category_filter'); $object->AddGroupByField('%1$s.ProductId'); - $object_product =& $this->Application->recallObject($event->Prefix); + $object_product = $this->Application->recallObject($event->Prefix); /* @var $object_product ProductsItem */ $content_ids_array = $object_product->GetPackageContentIds(); @@ -753,7 +753,7 @@ 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 + $object = $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too /* @var $object kDBItem */ $friend_email = $this->Application->GetVar('friend_email'); @@ -800,7 +800,7 @@ function OnSaveVirtualProduct($event) { $object =& $event->getObject( Array('skip_autoload' => true) ); - $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true)); + $listing_type = $this->Application->recallObject('lst', null, Array('skip_autoload' => true)); $listing_type->Load($event->MasterEvent->getEventParam('id')); $product_id = $listing_type->GetDBField('VirtualProductId'); @@ -812,7 +812,7 @@ if (!$listing_type->GetDBField('EnableBuying')) { if ($product_id) { // delete virtual product here - $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); + $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); $temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id)); $listing_type->SetDBField('VirtualProductId', 0); @@ -821,7 +821,7 @@ return true; } - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); + $ml_formatter = $this->Application->recallObject('kMultiLanguage'); $object->SetDBField($ml_formatter->LangFieldName('Name'), $listing_type->GetDBField('ShopCartName') ); $object->SetDBField($ml_formatter->LangFieldName('Description'), $listing_type->GetDBField('Description')); $object->SetDBField('SKU', 'ENHANCE_LINK_'.abs( crc32( $listing_type->GetDBField('Name') ) ) ); @@ -869,7 +869,7 @@ $product_id = $listing_type->GetDBField('VirtualProductId'); if ( $product_id ) { - $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); $temp_handler->DeleteItems($event->Prefix, $event->Special, Array ($product_id)); } } @@ -925,7 +925,7 @@ $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations', 'REPLACE'); - $sub_order =& $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord'); + $sub_order = $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord'); $sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0); $sub_order->SetDBField('GroupId', $group_id); $sub_order->SetDBField('NextCharge_date', $expire); @@ -1046,7 +1046,7 @@ { $object =& $event->getObject(); if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created - $opt_object =& $this->Application->recallObject('po', null, Array('skip_autoload' => true) ); + $opt_object = $this->Application->recallObject('po', null, Array('skip_autoload' => true) ); $has_required = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$opt_object->TableName.' WHERE Required = 1 AND ProductId = '.$object->GetDBField('ProductId')); //we need to imitate data sumbit, as parent' PreSave sets object values from $items_info $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) ); @@ -1065,7 +1065,7 @@ */ function setPrimaryPrice($product_id, $price, $additional_fields = Array()) { - $pr_object =& $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) ); + $pr_object = $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) ); /* @var $pr_object kDBItem */ $pr_object->Load( Array('ProductId' => $product_id, 'IsPrimary' => 1) ); @@ -1409,7 +1409,7 @@ if ( $this->Application->isAdminUser ) { // we may get product id out of OrderItem, if it exists - $ord_item =& $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0)); + $ord_item = $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0)); /* @var $ord_item OrdersItem */ if ( $ord_item->GetDBField('ProductId') ) {