Changeset 10050
- Timestamp:
- 12/04/2008 09:58:46 PM (16 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r10048 r10050 499 499 for ( $i = $i + 1; $i <= count($path); $i++ ) { 500 500 $tmppath = implode('/', array_slice($path, 0, $i) ); 501 if ( ! $fs->mkdir($tmppath, 0755) )501 if ( ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) 502 502 return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); 503 503 } … … 517 517 for ( $i = $i + 1; $i <= count($path); $i++ ) { //< count() no file component please. 518 518 $tmppath = $to . implode('/', array_slice($path, 0, $i) ); 519 if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, 0755) )519 if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) 520 520 return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); 521 521 } … … 528 528 if ( !$fs->put_contents( $to . $file['filename'], $file['content']) ) 529 529 return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']); 530 $fs->chmod($to . $file['filename'], 0644);530 $fs->chmod($to . $file['filename'], FS_CHMOD_FILE); 531 531 } 532 532 } … … 559 559 return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename); 560 560 } 561 $wp_filesystem->chmod($to . $filename, 0644);561 $wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE); 562 562 } elseif ( 'd' == $fileinfo['type'] ) { 563 563 if ( !$wp_filesystem->is_dir($to . $filename) ) { 564 if ( !$wp_filesystem->mkdir($to . $filename, 0755) )564 if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) ) 565 565 return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename); 566 566 } … … 604 604 if ( !$wp_filesystem->connect() ) 605 605 return false; //There was an erorr connecting to the server. 606 607 // Set the permission constants if not already set. 608 if ( ! defined('FS_CHMOD_DIR') ) 609 define('FS_CHMOD_DIR', 0755 ); 610 if ( ! defined('FS_CHMOD_FILE') ) 611 define('FS_CHMOD_FILE', 0644 ); 606 612 607 613 return true; -
trunk/wp-admin/includes/update-core.php
r9985 r10050 228 228 $maintenance_file = $to . '.maintenance'; 229 229 $wp_filesystem->delete($maintenance_file); 230 $wp_filesystem->put_contents($maintenance_file, $maintenance_string, 0644);230 $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); 231 231 232 232 // Copy new versions of WP files into place. -
trunk/wp-admin/includes/update.php
r9719 r10050 469 469 return new WP_Error('copy_failed', __('Could not copy files')); 470 470 } 471 $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', 0644);471 $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); 472 472 473 473 require(ABSPATH . 'wp-admin/includes/update-core.php');
Note: See TracChangeset
for help on using the changeset viewer.