From 3506db6e1cf1abb64947585f8872c854a88edda6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 16 May 2013 12:46:36 +0000 Subject: [PATCH] Don't show both "update failed" and "update successful" messages when upgrading a theme fails due to connectivity problems. Props SergeyBiryukov fixes #23027 git-svn-id: https://develop.svn.wordpress.org/trunk@24276 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-upgrader.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 86b5b71aae..ff3d0c7fcc 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1312,8 +1312,9 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { echo ''; } - if ( !empty($this->result) && !is_wp_error($this->result) ) { - echo '

' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '

'; + if ( $this->result && ! is_wp_error( $this->result ) ) { + if ( ! $this->error ) + echo '

' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '

'; echo ''; }