Index: branches/5.3.x/units/coupon_items/coupon_items_tag_processor.php =================================================================== diff -u -N -r15492 -r15695 --- branches/5.3.x/units/coupon_items/coupon_items_tag_processor.php (.../coupon_items_tag_processor.php) (revision 15492) +++ branches/5.3.x/units/coupon_items/coupon_items_tag_processor.php (.../coupon_items_tag_processor.php) (revision 15695) @@ -1,6 +1,6 @@ Application->getUnitOption($this->Prefix, 'TableName'); + $table_name = $this->getUnitConfig()->getTableName(); - if ($this->Application->IsTempMode($this->Prefix)) { + if ( $this->Application->IsTempMode($this->Prefix) ) { $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix); } $sql = 'SELECT COUNT(*) FROM ' . $table_name . ' WHERE (ItemType = 0) AND (CouponId = ' . $this->Application->GetVar('coup_id') . ')'; + return $this->Conn->GetOne($sql); } @@ -34,12 +35,16 @@ $object = $this->getObject($params); /* @var $object kDBList */ - if ($object->GetDBField('ItemType') == 2) { + if ( $object->GetDBField('ItemType') == 2 ) { $cat_object = $this->Application->recallObject('c'); - $cat_object->Load( $object->GetDBField('CategoryId') ); + /* @var $cat_object CategoriesItem */ + + $cat_object->Load($object->GetDBField('CategoryId')); + $cat_tag_processor = $this->Application->recallObject('c_TagProcessor'); + /* @var $cat_tag_processor CategoriesTagProcessor */ - return $cat_tag_processor->ItemIcon(); + return $cat_tag_processor->ItemIcon($params); } return parent::ItemIcon($params);