Index: branches/RC/core/install/upgrades.sql =================================================================== diff -u -N -r11572 -r11586 --- branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 11572) +++ branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 11586) @@ -1098,6 +1098,6 @@ DELETE FROM PersistantSessionData WHERE VariableName LIKE '%img%'; UPDATE Modules SET TemplatePath = Path WHERE TemplatePath <> ''; -UPDATE ConfigurationValues SET VariableValue = '/platform/designs/default_design.des' WHERE VariableName = 'cms_DefaultDesign'; +UPDATE ConfigurationValues SET VariableValue = '/platform/designs/general' WHERE VariableName = 'cms_DefaultDesign'; UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_categories' WHERE VariableName = 'cms_DefaultDesign'; UPDATE ConfigurationAdmin SET DisplayOrder = 10.29 WHERE VariableName = 'cms_DefaultDesign'; \ No newline at end of file Index: branches/RC/themes/default2009/platform/designs/general.tpl =================================================================== diff -u -N -r11530 -r11586 --- branches/RC/themes/default2009/platform/designs/general.tpl (.../general.tpl) (revision 11530) +++ branches/RC/themes/default2009/platform/designs/general.tpl (.../general.tpl) (revision 11586) @@ -1,3 +1,8 @@ + @@ -46,4 +51,4 @@ - \ No newline at end of file + \ No newline at end of file Index: branches/RC/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r11576 -r11586 --- branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 11576) +++ branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 11586) @@ -1335,7 +1335,7 @@ * @param StructureItem $object * @param string $template */ - function _prepareAutoPage(&$object, $template, $theme_id = null, $system_mode = SMS_MODE_AUTO) + function _prepareAutoPage(&$object, $template, $theme_id = null, $system_mode = SMS_MODE_AUTO, $theme_file_id = null) { $template = $this->_stripTemplateExtension($template); @@ -1370,7 +1370,7 @@ if ($system) { $design_template = strtolower($template); // leading "/" not added ! - $template_info = $this->_getTemplateInfo($design_template, $theme_id); + $template_info = $this->_getTemplateInfo($design_template, $theme_id, $theme_file_id); if ($template_info) { if (array_key_exists('name', $template_info) && $template_info['name']) { $page_name = $template_info['name']; @@ -1496,7 +1496,7 @@ * @param int $theme_id * @return Array */ - function _getTemplateInfo($template, $theme_id = null) + function _getTemplateInfo($template, $theme_id = null, $theme_file_id = null) { if (!defined('DBG_NPARSER_FORCE_COMPILE')) { $this->Application->InitParser(); @@ -1544,6 +1544,15 @@ $ret['section'] = implode('||', $category_path); } + if (isset($theme_file_id) && array_key_exists('desc', $ret)) { + // copy description from template to if's file record in ThemeFiles table + $fields_hash = Array ( + 'Description' => $ret['desc'], + ); + + $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ThemeFiles', 'FileId = ' . $theme_file_id); + } + return $ret; } } @@ -1794,7 +1803,7 @@ */ function OnAfterRebuildThemes(&$event) { - $sql = 'SELECT t.ThemeId, CONCAT( tf.FilePath, \'/\', tf.FileName ) AS Path + $sql = 'SELECT t.ThemeId, CONCAT( tf.FilePath, \'/\', tf.FileName ) AS Path, tf.FileId FROM '.TABLE_PREFIX.'ThemeFiles AS tf LEFT JOIN '.TABLE_PREFIX.'Theme AS t ON t.ThemeId = tf.ThemeId WHERE t.Enabled = 1 AND tf.FileType = 1 @@ -1803,7 +1812,7 @@ FROM ' . TABLE_PREFIX . 'Category WHERE CONCAT(\'/\', ' . TABLE_PREFIX . 'Category.Template, \'.tpl\') = CONCAT( tf.FilePath, \'/\', tf.FileName ) ) = 0 '; - $files = $this->Conn->GetCol($sql, 'Path'); + $files = $this->Conn->Query($sql, 'Path'); if (!$files) { // all possible pages are already created return ; @@ -1813,8 +1822,8 @@ /* @var $dummy kDBItem */ $error_count = 0; - foreach ($files as $a_file => $theme_id) { - $status = $this->_prepareAutoPage($dummy, $a_file, $theme_id, SMS_MODE_FORCE); // create system page + foreach ($files as $a_file => $file_info) { + $status = $this->_prepareAutoPage($dummy, $a_file, $file_info['ThemeId'], SMS_MODE_FORCE, $file_info['FileId']); // create system page if (!$status) { $error_count++; } Index: branches/RC/themes/default2009/platform/designs/form.tpl =================================================================== diff -u -N -r11530 -r11586 --- branches/RC/themes/default2009/platform/designs/form.tpl (.../form.tpl) (revision 11530) +++ branches/RC/themes/default2009/platform/designs/form.tpl (.../form.tpl) (revision 11586) @@ -1,3 +1,8 @@ + Index: branches/RC/core/install/install_data.sql =================================================================== diff -u -N -r11572 -r11586 --- branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 11572) +++ branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 11586) @@ -313,7 +313,7 @@ INSERT INTO Events VALUES (DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core:Category', 'la_CMS_FormSubmitted', 0); INSERT INTO ConfigurationAdmin VALUES ('cms_DefaultDesign', 'la_Text_General', 'la_prompt_DefaultDesignTemplate', 'text', NULL, NULL, 10.29, 0, 0); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'cms_DefaultDesign', '/platform/designs/default_design.des', 'In-Portal', 'in-portal:configure_categories'); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'cms_DefaultDesign', '/platform/designs/general', 'In-Portal', 'in-portal:configure_categories'); INSERT INTO IdGenerator VALUES ('100'); Index: branches/RC/themes/default2009/platform/template_manager/.smsignore =================================================================== diff -u -N --- branches/RC/themes/default2009/platform/template_manager/.smsignore (revision 0) +++ branches/RC/themes/default2009/platform/template_manager/.smsignore (revision 11586) @@ -0,0 +1 @@ +.* \ No newline at end of file