Index: branches/5.3.x/units/discount_items/discount_items_tag_processor.php =================================================================== diff -u -N -r15492 -r15695 --- branches/5.3.x/units/discount_items/discount_items_tag_processor.php (.../discount_items_tag_processor.php) (revision 15492) +++ branches/5.3.x/units/discount_items/discount_items_tag_processor.php (.../discount_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 (DiscountId = ' . $this->Application->GetVar('d_id') . ')'; + return $this->Conn->GetOne($sql); }