Fix inline documentation syntax in the WP_Upgrader->clear_destination() method added in 4.3.

See [32854]. See #32891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-07-13 19:45:45 +00:00
parent 62da20af9e
commit 0aecc0ce8b

View File

@ -301,8 +301,7 @@ class WP_Upgrader {
* @global WP_Filesystem_Base $wp_filesystem Subclass
*
* @param string $remote_destination The location on the remote filesystem to be cleared
*
* @return bool|WP_Error true upon success, {@see WP_Error} on failure.
* @return bool|WP_Error True upon success, WP_Error on failure.
*/
public function clear_destination( $remote_destination ) {
global $wp_filesystem;
@ -311,11 +310,12 @@ class WP_Upgrader {
return true;
}
// Check all files are writable before attempting to clear the destination
// Check all files are writable before attempting to clear the destination.
$unwritable_files = array();
$_files = $wp_filesystem->dirlist( $remote_destination, true, true );
// Flatten the resulting array, iterate using each as we append to the array during iteration
// Flatten the resulting array, iterate using each as we append to the array during iteration.
while ( $f = each( $_files ) ) {
$file = $f['value'];
$name = $f['key'];
@ -329,10 +329,11 @@ class WP_Upgrader {
}
}
// Check writability
// Check writability.
foreach ( $_files as $filename => $file_details ) {
if ( ! $wp_filesystem->is_writable( $remote_destination . $filename ) ) {
// Attempt to alter permissions to allow writes and try again
// Attempt to alter permissions to allow writes and try again.
$wp_filesystem->chmod( $remote_destination . $filename, ( 'd' == $file_details['type'] ? FS_CHMOD_DIR : FS_CHMOD_FILE ) );
if ( ! $wp_filesystem->is_writable( $remote_destination . $filename ) ) {
$unwritable_files[] = $filename;