From fe32e9f65b39d475545895f272e076835f58579c Mon Sep 17 00:00:00 2001
From: terrafrost <terrafrost@php.net>
Date: Mon, 18 May 2015 23:35:06 -0500
Subject: [PATCH] ...
---
wp-admin/includes/ajax-actions.php | 1 +
wp-admin/includes/class-wp-upgrader.php | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index 1addff7..aad8e95 100644
a
|
b
|
function wp_ajax_update_plugin() { |
2947 | 2947 | |
2948 | 2948 | wp_send_json_success( $status ); |
2949 | 2949 | } else if ( is_wp_error( $result ) ) { |
| 2950 | $status['errorCode'] = 'unable_to_connect_to_filesystem'; |
2950 | 2951 | $status['error'] = $result->get_error_message(); |
2951 | 2952 | wp_send_json_error( $status ); |
2952 | 2953 | } else if ( is_bool( $result ) && ! $result ) { |
diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
index acab417..062a680 100644
a
|
b
|
class Plugin_Upgrader extends WP_Upgrader { |
836 | 836 | * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem. |
837 | 837 | */ |
838 | 838 | public function bulk_upgrade( $plugins, $args = array() ) { |
| 839 | global $wp_filesystem; |
839 | 840 | |
840 | 841 | $defaults = array( |
841 | 842 | 'clear_update_cache' => true, |
… |
… |
class Plugin_Upgrader extends WP_Upgrader { |
856 | 857 | $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); |
857 | 858 | if ( ! $res ) { |
858 | 859 | $this->skin->footer(); |
859 | | return false; |
| 860 | return $wp_filesystem->errors; |
860 | 861 | } |
861 | 862 | |
862 | 863 | $this->skin->bulk_header(); |