Ticket #9303: 9303.patch
File 9303.patch, 937 bytes (added by , 16 years ago) |
---|
-
wp-admin/includes/plugin.php
447 447 $plugins_dir = trailingslashit( $plugins_dir ); 448 448 449 449 $errors = array(); 450 451 $current = get_transient('update_plugins'); 452 $changed = false; 450 453 451 454 foreach( $plugins as $plugin_file ) { 452 455 // Run Uninstall hook … … 462 465 463 466 if ( ! $deleted ) 464 467 $errors[] = $plugin_file; 468 else { 469 unset( $current->response[ $plugin_file ] ); 470 $changed = true; 471 } 465 472 } 466 473 467 474 if ( ! empty($errors) ) 468 475 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); 469 476 470 477 // Force refresh of plugin update information 471 delete_transient('update_plugins'); 478 if ( $changed ) 479 set_transient('update_plugins', $current); 472 480 473 481 return true; 474 482 }