Index: branches/5.0.x/core/install/incs/img/icon_content_management.gif =================================================================== diff -u -N Binary files differ Index: branches/5.0.x/core/install/install_toolkit.php =================================================================== diff -u -N -r12299 -r12416 --- branches/5.0.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 12299) +++ branches/5.0.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 12416) @@ -1,6 +1,6 @@ Application->recallObject('kXMLHelper'); + /* @var $xml_helper kXMLHelper */ + + $root_node =& $xml_helper->Parse( file_get_contents($info_file) ); + + if (!is_object($root_node) || !preg_match('/^kxmlnode/i', get_class($root_node)) || ($root_node->Name == 'ERROR')) { + // non-valid xml file + return Array (); + } + + $ret = Array (); + $current_node =& $root_node->firstChild; + + do { + $ret[ strtolower($current_node->Name) ] = trim($current_node->Data); + } while (($current_node =& $current_node->NextSibling())); + + return $ret; } /** + * Returns nice module string to be used on install/upgrade screens + * + * @param string $module_folder + * @param string $version_string + * @return string + */ + function getModuleString($module_folder, $version_string) + { + // image (if exists) ( ) + + $ret = Array (); + $module_info = $this->getModuleInfo($module_folder); + + if (array_key_exists('name', $module_info) && $module_info['name']) { + $module_name = $module_info['name']; + } + else { + $module_name = $this->getModuleName($module_folder); + } + + if (array_key_exists('image', $module_info) && $module_info['image']) { + $image_src = $module_info['image']; + + if (!preg_match('/^(http|https):\/\//', $image_src)) { + // local image -> make absolute url + $image_src = $this->Application->BaseURL() . $image_src; + } + + $ret[] = '' . htmlspecialchars($module_name) . ''; + } + + if (array_key_exists('description', $module_info) && $module_info['description']) { + $ret[] = $module_info['description']; + } + else { + $ret[] = $module_name; + } + + $ret[] = '(' . $module_name . ' ' . $version_string . ')'; + + return implode(' ', $ret); + } + + /** * Creates module root category in "Home" category using given data and returns it * * @param string $name Index: branches/5.0.x/core/install/module_info.xml =================================================================== diff -u -N --- branches/5.0.x/core/install/module_info.xml (revision 0) +++ branches/5.0.x/core/install/module_info.xml (revision 12416) @@ -0,0 +1,6 @@ + + + In-Portal + Content Management System + core/install/incs/img/icon_content_management.gif + \ No newline at end of file Index: branches/5.0.x/core/install/step_templates/choose_modules.tpl =================================================================== diff -u -N -r12117 -r12416 --- branches/5.0.x/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 12117) +++ branches/5.0.x/core/install/step_templates/choose_modules.tpl (.../choose_modules.tpl) (revision 12416) @@ -54,7 +54,8 @@ } $error_msg = $prerequisites_errors ? implode('
', $prerequisites_errors) : ''; + $module_string = $this->toolkit->getModuleString($module, $module_version); - echo sprintf($module_tpl, $module, $this->toolkit->getModuleName($module), $checked, $error_msg); + echo sprintf($module_tpl, $module, $module_string, $checked, $error_msg); } ?> \ No newline at end of file Index: branches/5.0.x/core/install/step_templates/upgrade_modules.tpl =================================================================== diff -u -N -r12117 -r12416 --- branches/5.0.x/core/install/step_templates/upgrade_modules.tpl (.../upgrade_modules.tpl) (revision 12117) +++ branches/5.0.x/core/install/step_templates/upgrade_modules.tpl (.../upgrade_modules.tpl) (revision 12416) @@ -29,9 +29,9 @@ ); $prerequisites_errors = $this->toolkit->CheckPrerequisites($module_params['Path'], $upgrade_versions, 'upgrade'); - $module_title = $this->toolkit->getModuleName($module_name).' ('.$module_params['Version'].' to '.$module_params['ToVersion'].')'; + $module_version = $module_params['Version'].' to '.$module_params['ToVersion']; if ($this->Application->isDebugMode()) { - $module_title .= ' [from: '.$module_params['FromVersion'].']'; + $module_version .= '; from: '.$module_params['FromVersion']; } if ($prerequisites_errors) { @@ -44,8 +44,9 @@ } $error_msg = $prerequisites_errors ? implode('
', $prerequisites_errors) : ''; + $module_string = $this->toolkit->getModuleString($module_name, $module_version); - echo sprintf($module_tpl, $module_name, $module_title, $checked, $error_msg); + echo sprintf($module_tpl, $module_name, $module_string, $checked, $error_msg); } ?>