r100273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100272‎ | r100273 | r100274 >
Date:20:32, 19 October 2011
Author:nelson
Status:deferred
Tags:
Comment:
overlap in transit. Using the version that blobaugh created.
Modified paths:
  • /branches/FileBackend/phase3/includes/filerepo/FileBackend.php (modified) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/filerepo/FileBackend.php
@@ -272,42 +272,3 @@
273273
274274 } // end class
275275
276 -
277 -/**
278 - * A helper class for FileBackend. Some filestores won't have files in the filesystem,
279 - * so we can't count on being able to hand out the filename. Instead, we hand out an
280 - * instance of this class, which will DTRT for all filestores.
281 - */
282 -class TempLocalFile {
283 -
284 - /**
285 - * @param String $file - mwrepo:// url for the file to hand out.
286 - */
287 - public function __construct( $file ) {
288 - $this->tempPath = $file;
289 - }
290 -
291 - /**
292 - * Returns a file path pointing to our file or a copy thereof.
293 - * @return String
294 - */
295 - public function path() {
296 - return $this->tempPath;
297 - }
298 -
299 - /**
300 - * we don't have a close() method. Just let the instance go out of scope.
301 - */
302 -
303 - /**
304 - * if we need to delete the file, do so now.
305 - */
306 - public function __destruct() {
307 - if ( $this->tempPath ) {
308 - // Clean up temporary data.
309 - // Only if we actually made a local copy!! unlink( $this->tempPath );
310 - $this->tempPath = null;
311 - }
312 - }
313 -
314 -} // end class

Status & tagging log