Index: trunk/core/kernel/application.php =================================================================== diff -u -r4567 -r4576 --- trunk/core/kernel/application.php (.../application.php) (revision 4567) +++ trunk/core/kernel/application.php (.../application.php) (revision 4576) @@ -327,14 +327,11 @@ function GetPrimaryCurrency() { - $has_incommerce = getArrayValue($this->ModuleInfo, 'In-Commerce'); - if($has_incommerce && $has_incommerce['Loaded'] ) - { + if ($this->isModuleEnabled('In-Commerce')) { $table = $this->getUnitOption('curr', 'TableName'); return $this->DB->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1'); } - else - { + else { return 'USD'; } } @@ -541,7 +538,7 @@ $template_cache =& $this->recallObject('TemplatesCache'); $t = $this->GetVar('t'); - if ($this->findModule('Name', 'In-CMS', 'Loaded')) { + if ($this->isModuleEnabled('In-CMS')) { $cms_handler =& $this->recallObject('cms_EventHandler'); if (!$template_cache->TemplateExists($t)) { $t = $cms_handler->GetDesignTemplate(); @@ -1815,16 +1812,16 @@ } /** - * Retuns true if module is enabled + * Allows to determine if module is installed & enabled * * @param string $module_name * @return bool */ - /*function isModuleEnabled($module_name) + function isModuleEnabled($module_name) { - return getArrayValue($this->ModuleInfo, $module_name, 'Loaded'); + return $this->findModule('Name', $module_name, 'Loaded'); - }*/ + } function reportError($class, $method) { Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r4528 -r4576 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4528) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4576) @@ -517,7 +517,7 @@ }while (!$template_found && $template_parts); // try to find template in virtual templates in case if such ability exists - if ($this->Application->findModule('Name', 'In-CMS', 'Loaded') && !$template_found) { + if ($this->Application->isModuleEnabled('In-CMS') && !$template_found) { $template_parts = $url_parts; $url_parts = Array();