WordPress.org

Make WordPress Core

Ticket #16817: 16817.diff

File 16817.diff, 1.8 KB (added by solarissmoke, 4 years ago)

Don't show "all updates completed" message if there were errors. Also fix duplicate full stop.

  • wp-admin/includes/class-wp-upgrader.php

     
    10671067class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { 
    10681068        var $in_loop = false; 
    10691069        var $error = false; 
     1070        var $errors_occurred = false; 
    10701071 
    10711072        function Bulk_Upgrader_Skin($args = array()) { 
    10721073                return $this->__construct($args); 
     
    10811082 
    10821083        function add_strings() { 
    10831084                $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.'); 
    1084                 $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>.'); 
     1085                $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>'); 
    10851086                $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.'); 
    10861087                $this->upgrader->strings['skin_update_successful'] = __('%1$s updated successfully.').' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>'.__('Show Details').'</span><span class="hidden">'.__('Hide Details').'</span>.</a>'; 
    10871088                $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.'); 
     
    11261127                        $this->error = implode(', ', $messages); 
    11271128                } 
    11281129                echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 
     1130                $this->errors_occurred = true; 
    11291131        } 
    11301132 
    11311133        function bulk_header() { 
     
    11331135        } 
    11341136 
    11351137        function bulk_footer() { 
    1136                 $this->feedback('skin_upgrade_end'); 
     1138                if( !$this->errors_occurred ) 
     1139                        $this->feedback( 'skin_upgrade_end' ); 
    11371140        } 
    11381141 
    11391142        function before($title = '') {