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: http://core.svn.wordpress.org/trunk@24276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2013-05-16 12:46:36 +00:00
parent 7a1bc5769e
commit 9eff7bb71a

View File

@ -1312,8 +1312,9 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
}
if ( !empty($this->result) && !is_wp_error($this->result) ) {
echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
if ( $this->result && ! is_wp_error( $this->result ) ) {
if ( ! $this->error )
echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
}