mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-19 21:15:23 +00:00
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:
parent
58db3173f1
commit
5661464d35
@ -2076,6 +2076,7 @@ class Core_Upgrader extends WP_Upgrader {
|
|||||||
'success' => true,
|
'success' => true,
|
||||||
'fs_method' => $wp_filesystem->method,
|
'fs_method' => $wp_filesystem->method,
|
||||||
'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( '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,
|
'time_taken' => time() - $start_time,
|
||||||
'reported' => $wp_version,
|
'reported' => $wp_version,
|
||||||
'attempted' => $current->version,
|
'attempted' => $current->version,
|
||||||
|
@ -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,
|
// WordPress is creating files as the same owner as the WordPress files,
|
||||||
// this means it's safe to modify & create new files via PHP.
|
// this means it's safe to modify & create new files via PHP.
|
||||||
$method = 'direct';
|
$method = 'direct';
|
||||||
|
$GLOBALS['_wp_filesystem_direct_method'] = 'file_owner';
|
||||||
} else if ( $allow_relaxed_file_ownership ) {
|
} else if ( $allow_relaxed_file_ownership ) {
|
||||||
// The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files
|
// 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.
|
// safely in this directory. This mode doesn't create new files, only alter existing ones.
|
||||||
$method = 'direct';
|
$method = 'direct';
|
||||||
|
$GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership';
|
||||||
}
|
}
|
||||||
|
|
||||||
@fclose($temp_handle);
|
@fclose($temp_handle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user