Clean up Plugin/Theme uploads after successfully installing them. Restores pre-3.2 behaviour. See #18182

git-svn-id: http://svn.automattic.com/wordpress/trunk@18614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32
2011-08-28 03:51:35 +00:00
parent f1ac48873b
commit ea3a169b6f
2 changed files with 10 additions and 0 deletions

View File

@@ -1458,4 +1458,10 @@ class File_Upload_Upgrader {
$this->package = $uploads['basedir'] . '/' . $this->filename;
}
}
function cleanup() {
if ( file_exists($this->package) )
return @unlink($this->package);
return true;
}
}