Index: branches/5.2.x/units/currencies/currency_rates.php =================================================================== diff -u -r13845 -r14099 --- branches/5.2.x/units/currencies/currency_rates.php (.../currency_rates.php) (revision 13845) +++ branches/5.2.x/units/currencies/currency_rates.php (.../currency_rates.php) (revision 14099) @@ -1,6 +1,6 @@ GetRatesData(); } @@ -32,13 +37,11 @@ $primary = $this->Application->GetPrimaryCurrency(); if ($rates === false) { - $conn =& $this->Application->GetADODBConnection(); - - $conn->nextQueryCachable = true; + $this->Conn->nextQueryCachable = true; $sql = 'SELECT ISO, RateToPrimary FROM ' . $this->Application->getUnitOption('curr', 'TableName') . ' WHERE Status = ' . STATUS_ACTIVE; - $rates = $conn->Query($sql); + $rates = $this->Conn->Query($sql); $this->Application->setCache($cache_key, $rates); } @@ -117,10 +120,11 @@ class kBankLVCurrencyRates extends kCurrencyRates { - function kBankLVCurrencyRates() + public function __construct() { $this->RateSource = 'http://www.bank.lv/ValutuKursi/XML/xml.cfm'; - parent::kCurrencyRates(); + + parent::__construct(); } function GetRatesData() @@ -168,10 +172,11 @@ class kECBCurrencyRates extends kCurrencyRates { - function kECBCurrencyRates() + public function __construct() { $this->RateSource = 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml'; - parent::kCurrencyRates(); + + parent::__construct(); } function GetRatesData() @@ -210,10 +215,11 @@ class kFRNYCurrencyRates extends kCurrencyRates { - function kFRNYCurrencyRates() + public function __construct() { $this->RateSource = 'http://www.ny.frb.org/markets/fxrates/FXtoXML.cfm?FEXdate=%s&FEXtime=1200'; - parent::kCurrencyRates(); + + parent::__construct(); } function GetRatesData()