Index: install.php =================================================================== --- install.php (revision 14184) +++ install.php (working copy) @@ -832,7 +832,7 @@ $theme_id = $this->GetVar('theme'); $theme_table = $this->Application->getUnitOption('theme', 'TableName'); $theme_idfield = $this->Application->getUnitOption('theme', 'IDField'); - + $sql = 'UPDATE ' . $theme_table . ' SET Enabled = 1, PrimaryTheme = 1 WHERE ' . $theme_idfield . ' = ' . $theme_id; @@ -846,13 +846,19 @@ FROM ' . $theme_table . ' WHERE ' . $theme_idfield . ' = ' . $theme_id; $theme_name = $this->Conn->GetOne($sql); - + $site_path = $this->Application->ConfigValue('Site_Path'); + foreach ($this->Application->ModuleInfo as $module_name => $module_info) { if ($module_name == 'In-Portal') { continue; - } + } + $this->toolkit->RunSQL( '/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath'] . '_install/install_data.sql', Array('{ThemeId}', '{SitePath}'), Array($theme_id, $site_path) ); - $this->toolkit->RunSQL('/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath'] . '_install/install_data.sql', '{ThemeId}', $theme_id); + $file_helper =& $this->Application->recallObject('FileHelper'); + /* var $file_helper FileHelper */ + + // copy theme demo images into writable path accessible by fck editor + $file_helper->Copy(FULL_PATH . '/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath'] . '_install/images', WRITEABLE . '/user_files/Images'); } } break;