From: Aaron Date: Mon, 20 Aug 2012 19:15:42 +0000 (-0700) Subject: Added "autocollect" function to TempFSFile. X-Git-Tag: 1.31.0-rc.0~22664^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=06a6e1cd34b723c18cd340bdd2545369243f0127;p=lhc%2Fweb%2Fwiklou.git Added "autocollect" function to TempFSFile. * This is useful for declaring a temp file not generated via factory() as a temp file. Change-Id: Iaa24ce3c3b0d1f7b3f492377f5bae40a1dd8869a --- diff --git a/includes/filebackend/TempFSFile.php b/includes/filebackend/TempFSFile.php index 00f1080950..ed6bf2f038 100644 --- a/includes/filebackend/TempFSFile.php +++ b/includes/filebackend/TempFSFile.php @@ -99,6 +99,15 @@ class TempFSFile extends FSFile { $this->canDelete = false; } + /** + * Set flag clean up after the temporary file + * + * @return void + */ + public function autocollect() { + $this->canDelete = true; + } + /** * Cleans up after the temporary file by deleting it */