[FileRepo] Added support for temp file repos (to preserve our thumb.php hack).
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 6 Apr 2012 17:11:13 +0000 (10:11 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 6 Apr 2012 22:55:44 +0000 (15:55 -0700)
commit8667a6354d3e6b948d1a273ca8c77929217528b2
tree4591ce72254d72f24d9b7376872586b15d8714e4
parent0c0a069ecea06b15ec44671ccf5fbfed7747ee30
[FileRepo] Added support for temp file repos (to preserve our thumb.php hack).

* Added FileRepo::getTempRepo() to get a temporary repo similiar to the one used in wmf1.19 thumb.php.
* Merged and cleaned up wmf1.19 code into thumb.php to handle temp files and thumbnails.

Change 1: prevent FileRepo::getTempRepo() from being called on the result of FileRepo::getTempRepo().

Change 2: made FileRepo::getTempRepo() account for cases when the 'directory' param is not the empty string.

Change 3:
* Tweaked TempFileRepo to override getTempRepo() to enforce restriction.
* Added FileRepo::getTempHashPath() and used in thumb.php to get the correct path.

Change-Id: I2937b5ffb3ec9a7e2741b42bc28dc76833053fcd
includes/filerepo/FileRepo.php
thumb.php