Index: branches/RC/core/install/install_toolkit.php =================================================================== diff -u -r11693 -r11711 --- branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 11693) +++ branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 11711) @@ -75,7 +75,7 @@ $this->Conn =& $this->Application->GetADODBConnection(); } - $this->INIFile = FULL_PATH . '/config.php'; + $this->INIFile = FULL_PATH . DIRECTORY_SEPARATOR . 'config.php'; $this->systemConfig = $this->ParseConfig(true); } @@ -325,6 +325,7 @@ * * @param string $lang_file * @param bool $upgrade + * @todo Import for "core/install/english.lang" (322KB) takes 18 seconds to work on Windows */ function ImportLanguage($lang_file, $upgrade = false) { @@ -333,10 +334,10 @@ return ; } - $lang_xml =& $this->Application->recallObject('LangXML'); - /* @var $lang_xml LangXML_Parser */ + $language_import_helper =& $this->Application->recallObject('LanguageImportHelper'); + /* @var $language_import_helper LanguageImportHelper */ - $lang_xml->Parse($lang_file, '|0|1|2|', '', $upgrade ? LANG_SKIP_EXISTING : LANG_OVERWRITE_EXISTING); + $language_import_helper->performImport($lang_file, '|0|1|2|', '', $upgrade ? LANG_SKIP_EXISTING : LANG_OVERWRITE_EXISTING); } /** @@ -438,7 +439,7 @@ function SaveConfig($silent = false) { - if (!is_writeable($this->INIFile)) { + if (!is_writable($this->INIFile) && !is_writable(dirname($this->INIFile))) { trigger_error('Cannot write to "' . $this->INIFile . '" file.', $silent ? E_USER_NOTICE : E_USER_ERROR); return ; } @@ -612,8 +613,13 @@ function linkCustomFields($module_folder, $prefix, $item_type) { $module_folder = strtolower($module_folder); - $module_name = ($module_folder == 'kernel') ? 'in-portal' : $module_folder; + $module_name = $module_folder; + if ($module_folder == 'kernel') { + $module_name = 'in-portal'; + $module_folder = 'core'; + } + $db =& $this->Application->GetADODBConnection(); $sql = 'SELECT FieldName, CustomFieldId @@ -632,8 +638,10 @@ // because of configs was read only from installed before modules (in-portal), then reread configs $unit_config_reader =& $this->Application->recallObject('kUnitConfigReader'); - $unit_config_reader->scanModules(MODULES_PATH . '/' . $module_folder); + /* @var $unit_config_reader kUnitConfigReader */ + $unit_config_reader->scanModules(MODULES_PATH . DIRECTORY_SEPARATOR . $module_folder); + // create correct columns in CustomData table $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); $ml_helper->createFields($prefix . '-cdata', true);