Index: branches/RC/admin/install/install_lib.php =================================================================== diff -u -r8929 -r9335 --- branches/RC/admin/install/install_lib.php (.../install_lib.php) (revision 8929) +++ branches/RC/admin/install/install_lib.php (.../install_lib.php) (revision 9335) @@ -349,11 +349,11 @@ if ($version === false) { $version = K4_GetMaxModuleVersion($module_name); } - + $sql = 'UPDATE '.TABLE_PREFIX.'Modules SET Version = "'.$version.'" WHERE Name = "'.$module_name.'"'; - + $db =& inst_GetADODBConnection(true); $db->Query($sql); } @@ -362,23 +362,23 @@ { define('UPGRADES_FILE', FULL_PATH.'/%sinstall/upgrades.sql'); define('VERSION_MARK', '# ===== v ([\d]+\.[\d]+\.[\d]+) ====='); - + $upgrades_file = sprintf(UPGRADES_FILE, strtolower($module_name).'/'); if (!file_exists($upgrades_file)) { // no upgrade file return '4.0.1'; } - + $sqls = file_get_contents($upgrades_file); $versions_found = preg_match_all('/'.VERSION_MARK.'/s', $sqls, $regs); if (!$versions_found) { // upgrades file doesn't contain version definitions return '4.0.1'; } - + return end($regs[1]); } - + function RunRestoreFile($ado,$filename,$FileOffset,$MaxLines) { $size = filesize($filename); @@ -1010,7 +1010,7 @@ $lang_path = FULL_PATH.'/'.$module_name.'/admin/install/langpacks'; $lang_xml->Parse($lang_path.'/english.lang', '|0|1|2|', ''); - + $app->Redirect('in-portal/modules/modules_list', Array('pass' => 'all', 'admin' => 1, 'RefreshTree' => 1), '', 'index.php'); } @@ -1055,6 +1055,8 @@ $application =& kApplication::Instance(); $ml_helper =& $application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ + $ml_helper->createFields($prefix.'-cdata', true); $db =& $application->GetADODBConnection(); @@ -1077,6 +1079,9 @@ $field_mask = ''; $language_count = $ml_helper->getLanguageCount(); while ($i <= $language_count) { + if (!$ml_helper->LanguageFound($i)) { + continue; + } $field_mask .= 'cdata%1$s.l'.$i.'_Value AS l'.$i.'_cust_%1$s, '; $i++; }