WordPress.org

Make WordPress Core

Ticket #27196: 27196.2.diff

File 27196.2.diff, 1.2 KB (added by DavidAnderson, 8 years ago)

Updated patch

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

     
    5252                $this->strings['installing_package'] = __('Installing the latest version…');
    5353                $this->strings['no_files'] = __('The package contains no files.');
    5454                $this->strings['folder_exists'] = __('Destination folder already exists.');
     55                $this->strings['remove_first'] = __( 'Unable to install over existing folder - you probably need either to delete the installed version first, or to perform your update using the dashboard\'s updates page.' );
    5556                $this->strings['mkdir_failed'] = __('Could not create directory.');
    5657                $this->strings['incompatible_archive'] = __('The package could not be installed.');
    5758
     
    364365                $this->skin->set_result($result);
    365366                if ( is_wp_error($result) ) {
    366367                        $this->skin->error($result);
     368                        if ( in_array( 'folder_exists', $result->get_error_codes() ) ){
     369                                $this->skin->feedback( 'remove_first' );
     370                        }
    367371                        $this->skin->feedback('process_failed');
    368372                } else {
    369373                        //Install Succeeded