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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user