Index: branches/5.1.x/core/install.php =================================================================== diff -u -N -r14162 -r14195 --- branches/5.1.x/core/install.php (.../install.php) (revision 14162) +++ branches/5.1.x/core/install.php (.../install.php) (revision 14195) @@ -1,6 +1,6 @@ Conn->GetOne($sql); + $site_path = $this->Application->ConfigValue('Site_Path'); + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + 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', '{ThemeId}', $theme_id); + $template_path = '/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath']; + $this->toolkit->RunSQL( $template_path . '_install/install_data.sql', Array('{ThemeId}', '{SitePath}'), Array($theme_id, $site_path) ); + + // copy theme demo images into writable path accessible by FCKEditor + $file_helper->copyFolderRecursive(FULL_PATH . $template_path . '_install/images' . DIRECTORY_SEPARATOR, WRITEABLE . '/user_files/Images'); } } break;