Dummy proof TempFSFile purging when the constructor is used directly to avoid data...
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 27 Feb 2012 23:00:32 +0000 (23:00 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 27 Feb 2012 23:00:32 +0000 (23:00 +0000)
includes/filerepo/backend/TempFSFile.php

index a9e5106..7843d6c 100644 (file)
@@ -11,7 +11,7 @@
  * @ingroup FileBackend
  */
 class TempFSFile extends FSFile {
-       protected $canDelete = true; // garbage collect the temp file
+       protected $canDelete = false; // bool; garbage collect the temp file
 
        /** @var Array of active temp files to purge on shutdown */
        protected static $instances = array();
@@ -41,6 +41,7 @@ class TempFSFile extends FSFile {
                        }
                }
                $tmpFile = new self( $path );
+               $tmpFile->canDelete = true; // safely instantiated
                return $tmpFile;
        }