Index: branches/5.1.x/core/install/install_toolkit.php =================================================================== diff -u -N -r13312 -r13367 --- branches/5.1.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 13312) +++ branches/5.1.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 13367) @@ -1,6 +1,6 @@ ', $table_prefix, $sqls); + $sqls = str_replace('<%PRIMARY_LANGUAGE%>', $this->Application->GetDefaultLanguageId(), $sqls); if (isset($replace_from) && isset($replace_to)) { // replace something additionally, e.g. module root category @@ -591,12 +592,17 @@ /** * Returns information about module (based on "install/module_info.xml" file) * - * @param string $module_folder + * @param string $module_name * @return Array */ - function getModuleInfo($module_folder) + function getModuleInfo($module_name) { - $info_file = MODULES_PATH . '/' . $module_folder . '/install/module_info.xml'; + if ($module_name == 'core') { + $info_file = FULL_PATH . '/' . $module_name . '/install/module_info.xml'; + } + else { + $info_file = MODULES_PATH . '/' . $module_name . '/install/module_info.xml'; + } if (!file_exists($info_file)) { return Array (); @@ -625,22 +631,22 @@ /** * Returns nice module string to be used on install/upgrade screens * - * @param string $module_folder + * @param string $module_name * @param string $version_string * @return string */ - function getModuleString($module_folder, $version_string) + function getModuleString($module_name, $version_string) { // image (if exists) ( ) $ret = Array (); - $module_info = $this->getModuleInfo($module_folder); + $module_info = $this->getModuleInfo($module_name); if (array_key_exists('name', $module_info) && $module_info['name']) { $module_name = $module_info['name']; } else { - $module_name = $this->getModuleName($module_folder); + $module_name = $this->getModuleName($module_name); } if (array_key_exists('image', $module_info) && $module_info['image']) { Index: branches/5.1.x/core/install.php =================================================================== diff -u -N -r13312 -r13367 --- branches/5.1.x/core/install.php (.../install.php) (revision 13312) +++ branches/5.1.x/core/install.php (.../install.php) (revision 13367) @@ -1,6 +1,6 @@ toolkit->ConvertModuleVersion($version); + + if ($version < $this->toolkit->ConvertModuleVersion('5.1.0')) { + return 'modules/' . $path; + } + + return $path; + } + + /** * Returns list of modules, that can be upgraded * */ @@ -1194,7 +1218,9 @@ continue; } + $module_info['Path'] = $this->getModulePath($module_name, $module_info['Path'], $module_info['Version']); $upgrades_file = sprintf(UPGRADES_FILE, $module_info['Path'], 'sql'); + if (!file_exists($upgrades_file)) { // no upgrade file continue;