Make WordPress Core


Ignore:
Timestamp:
01/14/2010 09:23:53 AM (17 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r12544 r12723  
    551551                // We've made sure the folders are there, so let's extract the file now:
    552552                if ( ! $file['folder'] ) {
    553                         if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
     553                        if ( !$fs->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
    554554                                return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
    555                         $fs->chmod($to . $file['filename'], FS_CHMOD_FILE);
    556555                }
    557556        }
Note: See TracChangeset for help on using the changeset viewer.