Store Plugin/Theme uploads in the Media Library properly. Add Scheduled cleanup +2hrs to clean up any aborted installation attempts. See #18182

git-svn-id: https://develop.svn.wordpress.org/trunk@18617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2011-08-28 08:42:07 +00:00
parent 4f8bd53070
commit 06338d1653
3 changed files with 49 additions and 17 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ if ( isset($_GET['action']) ) {
$title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) );
$nonce = 'plugin-upload';
$url = add_query_arg(array('package' => $file_upload->filename ), 'update.php?action=upload-plugin');
$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-plugin');
$type = 'upload'; //Install plugin type, From Web or an Upload.
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
@@ -239,7 +239,7 @@ if ( isset($_GET['action']) ) {
$title = sprintf( __('Installing Theme from uploaded file: %s'), basename( $file_upload->filename ) );
$nonce = 'theme-upload';
$url = add_query_arg(array('package' => $file_upload->filename), 'update.php?action=upload-theme');
$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-theme');
$type = 'upload'; //Install plugin type, From Web or an Upload.
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );