Changeset 45611 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 07/09/2019 05:44:42 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r45602 r45611 609 609 ); 610 610 611 @wp_mail( $email, __( 'New WordPress Site' ), $message );611 wp_mail( $email, __( 'New WordPress Site' ), $message ); 612 612 } 613 613 endif; … … 2970 2970 $index = implode( '', file( "$oldpath/$oldfile" ) ); 2971 2971 if ( strpos( $index, 'WP_USE_THEMES' ) !== false ) { 2972 if ( ! @copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) {2972 if ( ! copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) { 2973 2973 return false; 2974 2974 } … … 2979 2979 } 2980 2980 2981 if ( ! @copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) {2981 if ( ! copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) { 2982 2982 return false; 2983 2983 } … … 3040 3040 //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); 3041 3041 3042 $theme_dir = @ 3042 $theme_dir = @opendir( $default_dir ); 3043 3043 if ( $theme_dir ) { 3044 3044 while ( ( $theme_file = readdir( $theme_dir ) ) !== false ) { … … 3046 3046 continue; 3047 3047 } 3048 if ( ! @copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) {3048 if ( ! copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) { 3049 3049 return; 3050 3050 } 3051 3051 chmod( "$site_dir/$theme_file", 0777 ); 3052 3052 } 3053 } 3054 @closedir( $theme_dir ); 3053 3054 closedir( $theme_dir ); 3055 } 3055 3056 3056 3057 // Rewrite the theme header. … … 3082 3083 } 3083 3084 3084 $images_dir = @ 3085 $images_dir = @opendir( "$default_dir/images" ); 3085 3086 if ( $images_dir ) { 3086 3087 while ( ( $image = readdir( $images_dir ) ) !== false ) { … … 3088 3089 continue; 3089 3090 } 3090 if ( ! @copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) {3091 if ( ! copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) { 3091 3092 return; 3092 3093 } 3093 3094 chmod( "$site_dir/images/$image", 0777 ); 3094 3095 } 3095 } 3096 @closedir( $images_dir ); 3096 3097 closedir( $images_dir ); 3098 } 3097 3099 } 3098 3100
Note: See TracChangeset
for help on using the changeset viewer.