Standardise WP_Filesystem_*::put_contents() arguments to support chmod reliably across all transports. Fixes #10889

git-svn-id: https://develop.svn.wordpress.org/trunk@12723 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-01-14 09:23:53 +00:00
parent c1f8977b95
commit 76592af8d8
5 changed files with 24 additions and 19 deletions
+1 -2
View File
@@ -550,9 +550,8 @@ function unzip_file($file, $to) {
// We've made sure the folders are there, so let's extract the file now:
if ( ! $file['folder'] ) {
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
if ( !$fs->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
$fs->chmod($to . $file['filename'], FS_CHMOD_FILE);
}
}
return true;