Index: trunk/core/kernel/application.php =================================================================== diff -u -r1560 -r1591 --- trunk/core/kernel/application.php (.../application.php) (revision 1560) +++ trunk/core/kernel/application.php (.../application.php) (revision 1591) @@ -202,8 +202,19 @@ function GetPrimaryCurrency() { - $table = $this->getUnitOption('curr','TableName'); - return $this->DB->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1'); + $this->setUnitOption('mod','AutoLoad',false); + $module =& $this->recallObject('mod'); + $this->setUnitOption('mod','AutoLoad',true); + + if( $module->Load('In-Commerce') ) + { + $table = $this->getUnitOption('curr','TableName'); + return $this->DB->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1'); + } + else + { + return 'USD'; + } } /**