Ticket #44236: 44263.3.patch
File 44263.3.patch, 2.6 KB (added by , 6 years ago) |
---|
-
src/wp-admin/includes/file.php
2043 2043 $stripped_email = sanitize_title( $stripped_email ); // slugify the email address 2044 2044 $obscura = wp_generate_password( 32, false, false ); 2045 2045 $file_basename = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura; 2046 $html_report_filename = $file_basename . '.html'; 2046 2047 /** 2048 * Filters the personal data export html filename 2049 * 2050 * @since 4.9.9 2051 * 2052 * @param string $file_basename the personal data export file basename. 2053 * 2054 */ 2055 $html_report_filename = apply_filters( 'wp_personal_export_html_filename', $file_basename ) . '.html'; 2047 2056 $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename ); 2048 2057 $file = fopen( $html_report_pathname, 'w' ); 2049 2058 if ( false === $file ) { … … 2150 2159 2151 2160 $zip = new ZipArchive; 2152 2161 if ( true === $zip->open( $archive_pathname, ZipArchive::CREATE ) ) { 2153 if ( ! $zip->addFile( $html_report_pathname, 'index.html') ) {2162 if ( ! $zip->addFile( $html_report_pathname, $html_report_filename ) ) { 2154 2163 $error = __( 'Unable to add data to export file.' ); 2155 2164 } 2156 2165