Changeset 31749 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/12/2015 08:52:42 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r31645 r31749 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 ); 2916 2920 } 2917 2921 … … 2955 2959 $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() ); 2956 2960 $result = $upgrader->bulk_upgrade( array( $plugin ) ); 2957 2958 2961 if ( is_array( $result ) ) { 2959 $result = $result[ $plugin ]; 2960 } 2961 2962 if ( is_wp_error( $result ) ) { 2962 wp_send_json_success( $status ); 2963 } else if ( is_wp_error( $result ) ) { 2963 2964 $status['error'] = $result->get_error_message(); 2964 2965 wp_send_json_error( $status ); 2965 } 2966 2967 wp_send_json_success( $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 } 2968 2971 } 2969 2972
Note: See TracChangeset
for help on using the changeset viewer.