Changeset 38167
- Timestamp:
- 07/27/2016 05:09:27 PM (8 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r38159 r38167 3516 3516 } 3517 3517 3518 // Check filesystem credentials. `delete_plugins()` will bail otherwise. 3518 // Check filesystem credentials. `delete_theme()` will bail otherwise. 3519 $url = wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet ); 3519 3520 ob_start(); 3520 $url = wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet ); 3521 if ( false === ( $credentials = request_filesystem_credentials( $url ) ) || ! WP_Filesystem( $credentials ) ) { 3521 $credentials = request_filesystem_credentials( $url ); 3522 ob_end_clean(); 3523 if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { 3522 3524 global $wp_filesystem; 3523 ob_end_clean();3524 3525 3525 3526 $status['errorCode'] = 'unable_to_connect_to_filesystem'; … … 3772 3773 3773 3774 // Check filesystem credentials. `delete_plugins()` will bail otherwise. 3775 $url = wp_nonce_url( 'plugins.php?action=delete-selected&verify-delete=1&checked[]=' . $plugin, 'bulk-plugins' ); 3774 3776 ob_start(); 3775 $url = wp_nonce_url( 'plugins.php?action=delete-selected&verify-delete=1&checked[]=' . $plugin, 'bulk-plugins' ); 3776 if ( false === ( $credentials = request_filesystem_credentials( $url ) ) || ! WP_Filesystem( $credentials ) ) { 3777 $credentials = request_filesystem_credentials( $url ); 3778 ob_end_clean(); 3779 if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { 3777 3780 global $wp_filesystem; 3778 ob_end_clean();3779 3781 3780 3782 $status['errorCode'] = 'unable_to_connect_to_filesystem'; -
trunk/src/wp-admin/includes/plugin.php
r38074 r38167 783 783 $checked[] = 'checked[]=' . $plugin; 784 784 785 $url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-plugins'); 786 785 787 ob_start(); 786 $ url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-plugins');787 if ( false === ($credentials = request_filesystem_credentials($url)) ) {788 $data = ob_get_clean(); 789 788 $credentials = request_filesystem_credentials( $url ); 789 $data = ob_get_clean(); 790 791 if ( false === $credentials ) { 790 792 if ( ! empty($data) ){ 791 793 include_once( ABSPATH . 'wp-admin/admin-header.php'); … … 797 799 } 798 800 799 if ( ! WP_Filesystem($credentials) ) { 800 request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again 801 if ( ! WP_Filesystem( $credentials ) ) { 802 ob_start(); 803 request_filesystem_credentials( $url, '', true ); // Failed to connect, Error and request again. 801 804 $data = ob_get_clean(); 802 805 -
trunk/src/wp-admin/includes/theme.php
r38082 r38167 24 24 return false; 25 25 26 if ( empty( $redirect ) ) { 27 $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet); 28 } 29 26 30 ob_start(); 27 if ( empty( $redirect ) ) 28 $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet); 29 if ( false === ($credentials = request_filesystem_credentials($redirect)) ) { 30 $data = ob_get_clean(); 31 32 if ( ! empty($data) ){ 31 $credentials = request_filesystem_credentials( $redirect ); 32 $data = ob_get_clean(); 33 34 if ( false === $credentials ) { 35 if ( ! empty( $data ) ){ 33 36 include_once( ABSPATH . 'wp-admin/admin-header.php'); 34 37 echo $data; … … 39 42 } 40 43 41 if ( ! WP_Filesystem($credentials) ) { 42 request_filesystem_credentials($redirect, '', true); // Failed to connect, Error and request again 44 if ( ! WP_Filesystem( $credentials ) ) { 45 ob_start(); 46 request_filesystem_credentials( $redirect, '', true ); // Failed to connect, Error and request again. 43 47 $data = ob_get_clean(); 44 48
Note: See TracChangeset
for help on using the changeset viewer.