From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/filerepo/backend/TempFSFile.php | 92 -------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 includes/filerepo/backend/TempFSFile.php (limited to 'includes/filerepo/backend/TempFSFile.php') diff --git a/includes/filerepo/backend/TempFSFile.php b/includes/filerepo/backend/TempFSFile.php deleted file mode 100644 index 7843d6cd..00000000 --- a/includes/filerepo/backend/TempFSFile.php +++ /dev/null @@ -1,92 +0,0 @@ -= 15 ) { - return null; // give up - } - } - $tmpFile = new self( $path ); - $tmpFile->canDelete = true; // safely instantiated - return $tmpFile; - } - - /** - * Purge this file off the file system - * - * @return bool Success - */ - public function purge() { - $this->canDelete = false; // done - wfSuppressWarnings(); - $ok = unlink( $this->path ); - wfRestoreWarnings(); - return $ok; - } - - /** - * Clean up the temporary file only after an object goes out of scope - * - * @param $object Object - * @return void - */ - public function bind( $object ) { - if ( is_object( $object ) ) { - $object->tempFSFileReferences[] = $this; - } - } - - /** - * Set flag to not clean up after the temporary file - * - * @return void - */ - public function preserve() { - $this->canDelete = false; - } - - /** - * Cleans up after the temporary file by deleting it - */ - function __destruct() { - if ( $this->canDelete ) { - wfSuppressWarnings(); - unlink( $this->path ); - wfRestoreWarnings(); - } - } -} -- cgit v1.2.3-54-g00ecf