Changeset 31755 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/12/2015 05:50:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r31751 r31755 2914 2914 $status['error'] = $result->get_error_message(); 2915 2915 wp_send_json_error( $status ); 2916 } else if ( is_null( $result ) ) {2917 $status['errorCode'] = 'unable_to_connect_to_filesystem';2918 $status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );2919 wp_send_json_error( $status );2920 2916 } 2921 2917 … … 2959 2955 $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() ); 2960 2956 $result = $upgrader->bulk_upgrade( array( $plugin ) ); 2957 2961 2958 if ( is_array( $result ) ) { 2962 wp_send_json_success( $status ); 2963 } else if ( is_wp_error( $result ) ) { 2959 $result = $result[ $plugin ]; 2960 } 2961 2962 if ( is_wp_error( $result ) ) { 2964 2963 $status['error'] = $result->get_error_message(); 2965 2964 wp_send_json_error( $status ); 2966 } else if ( is_bool( $result ) && ! $result ) { 2967 $status['errorCode'] = 'unable_to_connect_to_filesystem'; 2968 $status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' ); 2969 wp_send_json_error( $status ); 2970 } 2965 } 2966 2967 wp_send_json_success( $status ); 2971 2968 } 2972 2969
Note: See TracChangeset
for help on using the changeset viewer.