Changeset 17525 for trunk/wp-admin/includes/file.php
- Timestamp:
- 03/22/2011 12:04:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r17200 r17525 81 81 $siteurl = get_option( 'siteurl' ); 82 82 if ( $home != '' && $home != $siteurl ) { 83 84 85 83 $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ 84 $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); 85 $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); 86 86 $home_path = trailingslashit( $home_path ); 87 87 } else { … … 774 774 foreach ( (array) $dirlist as $filename => $fileinfo ) { 775 775 if ( 'f' == $fileinfo['type'] ) { 776 if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true ) ) {776 if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) { 777 777 // If copy failed, chmod file to 0644 and try again. 778 778 $wp_filesystem->chmod($to . $filename, 0644); 779 if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true ) )779 if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) 780 780 return new WP_Error('copy_failed', __('Could not copy file.'), $to . $filename); 781 781 } 782 $wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE);783 782 } elseif ( 'd' == $fileinfo['type'] ) { 784 783 if ( !$wp_filesystem->is_dir($to . $filename) ) {
Note: See TracChangeset
for help on using the changeset viewer.