Changeset 30384 for trunk/src/wp-admin/update-core.php
- Timestamp:
- 11/19/2014 05:39:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r29825 r30384 382 382 return; 383 383 384 // Allow relaxed file ownership writes for User-initiated upgrades when the API specifies 385 // that it's safe to do so. This only happens when there are no new files to create. 386 $allow_relaxed_file_ownership = ! $reinstall && isset( $update->new_files ) && ! $update->new_files; 387 384 388 ?> 385 389 <div class="wrap"> … … 387 391 <?php 388 392 389 if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH ) ) ) {393 if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH, array(), $allow_relaxed_file_ownership ) ) ) { 390 394 echo '</div>'; 391 395 return; 392 396 } 393 397 394 if ( ! WP_Filesystem( $credentials, ABSPATH ) ) {398 if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) { 395 399 // Failed to connect, Error and request again 396 request_filesystem_credentials( $url, '', true, ABSPATH );400 request_filesystem_credentials( $url, '', true, ABSPATH, array(), $allow_relaxed_file_ownership ); 397 401 echo '</div>'; 398 402 return; … … 412 416 413 417 $upgrader = new Core_Upgrader(); 414 $result = $upgrader->upgrade( $update ); 418 $result = $upgrader->upgrade( $update, array( 419 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership 420 ) ); 415 421 416 422 if ( is_wp_error($result) ) {
Note: See TracChangeset
for help on using the changeset viewer.