Ticket #37531: 37531.3.diff
File 37531.3.diff, 3.3 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/ajax-actions.php
3353 3353 } 3354 3354 3355 3355 if ( is_wp_error( $result ) ) { 3356 $status['errorCode'] = $result->get_error_code(); 3356 3357 $status['errorMessage'] = $result->get_error_message(); 3357 3358 wp_send_json_error( $status ); 3358 3359 } elseif ( is_null( $result ) ) { … … 3602 3603 } 3603 3604 3604 3605 if ( is_wp_error( $result ) ) { 3606 $status['errorCode'] = $result->get_error_code(); 3605 3607 $status['errorMessage'] = $result->get_error_message(); 3606 3608 wp_send_json_error( $status ); 3607 3609 } elseif ( is_null( $result ) ) { -
src/wp-admin/includes/class-wp-upgrader.php
549 549 $_files = $wp_filesystem->dirlist($remote_destination); 550 550 if ( ! empty($_files) ) { 551 551 $wp_filesystem->delete($remote_source, true); //Clear out the source files. 552 return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); 552 $this->result = new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); 553 return $this->result; 553 554 } 554 555 } 555 556 -
src/wp-admin/js/updates.js
526 526 $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove(); 527 527 528 528 $document.trigger( 'wp-plugin-installing', args ); 529 529 530 530 return wp.updates.ajax( 'install-plugin', args ); 531 531 }; 532 532 … … 718 718 wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); 719 719 720 720 $document.trigger( 'wp-plugin-deleting', args ); 721 721 722 722 return wp.updates.ajax( 'delete-plugin', args ); 723 723 }; 724 724 … … 1043 1043 $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove(); 1044 1044 1045 1045 $document.trigger( 'wp-theme-installing', args ); 1046 1046 1047 1047 return wp.updates.ajax( 'install-theme', args ); 1048 1048 }; 1049 1049 … … 1174 1174 $( '.theme-info .update-message' ).remove(); 1175 1175 1176 1176 $document.trigger( 'wp-theme-deleting', args ); 1177 1177 1178 1178 return wp.updates.ajax( 'delete-theme', args ); 1179 1179 }; 1180 1180 … … 1525 1525 * @returns {boolean} Whether there is an error that needs to be handled or not. 1526 1526 */ 1527 1527 wp.updates.maybeHandleCredentialError = function( response, action ) { 1528 if ( response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) {1528 if ( wp.updates.shouldRequestFilesystemCredentials && response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) { 1529 1529 wp.updates.credentialError( response, action ); 1530 1530 return true; 1531 1531 } … … 1982 1982 $bulkActionForm.find( '.manage-column [type="checkbox"]' ).prop( 'checked', false ); 1983 1983 1984 1984 $document.trigger( 'wp-' + type + '-bulk-' + bulkAction, itemsSelected ); 1985 1985 1986 1986 // Find all the checkboxes which have been checked. 1987 1987 itemsSelected.each( function( index, element ) { 1988 1988 var $checkbox = $( element ),