Background Updates: Pass back whether Group Writable support is being leveraged for an update to the WordPress.org API.

See #30245

Built from https://develop.svn.wordpress.org/trunk@30860


git-svn-id: http://core.svn.wordpress.org/trunk@30850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2014-12-15 14:08:23 +00:00
parent 58db3173f1
commit 5661464d35
2 changed files with 3 additions and 0 deletions

View File

@ -2076,6 +2076,7 @@ class Core_Upgrader extends WP_Upgrader {
'success' => true,
'fs_method' => $wp_filesystem->method,
'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
'fs_method_direct' => !empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
'time_taken' => time() - $start_time,
'reported' => $wp_version,
'attempted' => $current->version,

View File

@ -928,10 +928,12 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
// WordPress is creating files as the same owner as the WordPress files,
// this means it's safe to modify & create new files via PHP.
$method = 'direct';
$GLOBALS['_wp_filesystem_direct_method'] = 'file_owner';
} else if ( $allow_relaxed_file_ownership ) {
// The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files
// safely in this directory. This mode doesn't create new files, only alter existing ones.
$method = 'direct';
$GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership';
}
@fclose($temp_handle);