mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Only clean up the uploaded files after a successful (or failed) install. Allows files to persist past the FTP credential screen. See #18182
git-svn-id: https://develop.svn.wordpress.org/trunk@18616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+6
-4
@@ -138,9 +138,10 @@ if ( isset($_GET['action']) ) {
|
||||
$type = 'upload'; //Install plugin type, From Web or an Upload.
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
|
||||
$upgrader->install( $file_upload->package );
|
||||
$result = $upgrader->install( $file_upload->package );
|
||||
|
||||
$file_upload->cleanup();
|
||||
if ( $result || is_wp_error($result) )
|
||||
$file_upload->cleanup();
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
@@ -242,9 +243,10 @@ if ( isset($_GET['action']) ) {
|
||||
$type = 'upload'; //Install plugin type, From Web or an Upload.
|
||||
|
||||
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
|
||||
$upgrader->install( $file_upload->package );
|
||||
$result = $upgrader->install( $file_upload->package );
|
||||
|
||||
$file_upload->cleanup();
|
||||
if ( $result || is_wp_error($result) )
|
||||
$file_upload->cleanup();
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user