getConnection('mysql'); $file_content = get_config_file_content('mysql', $connection); $config_file = PHPWG_ROOT_PATH . 'local/config/database.inc.php'; if ( !($fp=@fopen( $config_file, 'w' ))) { $tmp_filename = md5(uniqid('', true)); $fh = @fopen( $conf['local_data_dir'] . '/dm_' . $tmp_filename, 'w' ); @fputs($fh, $file_content, strlen($file_content)); @fclose($fh); $template->assign(array('config_creation_failed' => true, 'config_url' => $dm_base_url.'&tab=migration&dl='.$tmp_filename, 'config_file_content' => $file_content, ) ); } @fputs($fp, $file_content, strlen($file_content)); @fclose($fp); ?>