Index: branches/5.2.x/units/currencies/currencies_event_handler.php =================================================================== diff -u -N -r14677 -r14702 --- branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 14677) +++ branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 14702) @@ -1,6 +1,6 @@ Application->GetVar('unused_ids')) - { - $sql = 'UPDATE '.$this->Application->getUnitOption($event->Prefix, 'TableName').' + $unused_ids = $this->Application->GetVar('unused_ids'); + + if ( $unused_ids ) { + $sql = 'UPDATE ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . ' SET Status = 0 - WHERE CurrencyId IN('.$unused_ids.') AND IsPrimary <> 1'; + WHERE CurrencyId IN(' . $unused_ids . ') AND IsPrimary <> 1'; $this->Conn->Query($sql); } }