Make WordPress Core


Ignore:
Timestamp:
03/12/2015 05:50:54 PM (9 years ago)
Author:
ocean90
Message:

Revert [31749], see #31528.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r31751 r31755  
    29142914        $status['error'] = $result->get_error_message();
    29152915        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 );
    29202916    }
    29212917
     
    29592955    $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
    29602956    $result = $upgrader->bulk_upgrade( array( $plugin ) );
     2957
    29612958    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 ) ) {
    29642963        $status['error'] = $result->get_error_message();
    29652964        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 );
    29712968}
    29722969
Note: See TracChangeset for help on using the changeset viewer.