aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo
Commit message (Collapse)AuthorAgeFilesLines
* Disable file locking for thumbnail purging just as it already is with ↵Aaron Schulz2012-03-223-3/+8
| | | | | | | creation/updates (for performance). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113441
* [FileBackend] Made doOperations() Status handling align with documentation ↵Aaron Schulz2012-03-222-2/+12
| | | | | | | as well as what FileRepo is essentially expecting when using the 'force' option (it assumes fatals are for total batch failures, not just partial ones). The relevant documentation was also improved. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113412
* MFT r112918, r113214, r113268, r113277, r113312, r113415, r113454, r113737, ↵Sam Reed2012-03-161-3/+10
| | | | | | | r113758, r113775, r113892 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/114015
* MFT r113171, r113195, r1132111.19.0beta1Sam Reed2012-03-071-6/+5
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113235
* MFT r112563, r112566, r112838, r112872, r112873, r112988, r113001, r113024, ↵Sam Reed2012-03-061-0/+4
| | | | | | | r113039, r113046, r113099 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113157
* MFT r111427, r112347, r112374, r112383, r112700, r112750, r112855Sam Reed2012-03-052-38/+8
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113040
* MFT r112384, r112400, r112408, r112451, r112456, r112474, r112526, r112533, ↵Sam Reed2012-02-281-1/+2
| | | | | | | r112534, r112538, r112567 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112647
* MFT r111478, r111571, r111574, r111597, r111658Sam Reed2012-02-171-1/+5
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111770
* REL1_19: MFT r111029, r111034, r111067, r111076, r111085, r111128, r111144Sam Reed2012-02-101-3/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111175
* Blacklist | in windows paths tooSam Reed2012-02-091-1/+2
| | | | | | | Ping r110922 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110991
* * Corrected and improved FileBackend::getFileList() comments.Aaron Schulz2012-02-081-3/+6
| | | | | | | * Added unit tests for using getFileList() iterators twice. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110968
* Bumped $maxContCacheSize to handle container sharding a bit better. However, ↵Aaron Schulz2012-02-081-3/+3
| | | | | | | wikis large enough to need sharding would probably have sane 404 handling anyway, which avoids the need to hit a bunch of containers in one request anyway (like rendering thumbnails on parse). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110960
* enhance filerepo doc structureAntoine Musso2012-02-0812-26/+56
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110938
* rtrim() call does not pass by reference!Antoine Musso2012-02-081-1/+1
| | | | | | | fix r110923 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110934
* debug messages for getFileListInternal() returnsAntoine Musso2012-02-081-0/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110929
* align variables / enhance commentAntoine Musso2012-02-081-4/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110928
* debug statement for FileRepo::storeBatch()Antoine Musso2012-02-081-5/+7
| | | | | | | | | also nicely align some variable assignements Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110927
* r110923 made basePath always null!Antoine Musso2012-02-081-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110926
* align and sort class propertiesAntoine Musso2012-02-081-6/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110925
* fix notice on construction without 'containerPaths'Antoine Musso2012-02-081-3/+6
| | | | | | | | | | | | | | | | | The comment block seems to indicate that containerPaths should only be used for backwards-compatibility, which implies it is optional. The following code generated a notice: $fsBackend = new FSFileBackend( array( 'name' => 'foo', 'lockManager' => 'fsLockManager', 'basePath' => '/tmp/foo', ); Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110924
* use rtrim() to strip trailing slashesAntoine Musso2012-02-081-6/+6
| | | | | | | | rtrim() can be given a list of character to strip from a given string. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110923
* Added some simple path validation to resolveContainerPath() in ↵Aaron Schulz2012-02-081-1/+22
| | | | | | | FSFileBackend. This makes file op batches a bit more robust. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110922
* r109469: protect FileOpScopedPHPTimeout from abuse by infinite loops. Also ↵Aaron Schulz2012-02-071-8/+33
| | | | | | | commented out the invocation of it for now. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110812
* In FileBackend:Aaron Schulz2012-02-062-11/+31
| | | | | | | | | | * Added simple getReadOnly()/getReadOnlyReason() functions. * Allow directly passing a LockManager object into __construct(), useful for testing. * Fixed bug in FSFileBackend were creating empty files would result in a failing status. * Added more file stat unit tests. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110731
* Removed some useless code and a confusing comment in ↵Aaron Schulz2012-02-051-7/+2
| | | | | | | FSLockManager::doLock(). This was from before referencing counting was used. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110714
* Per r108369 CR comment, use StringUtils::escapeRegexReplacement() since ↵Aaron Schulz2012-02-032-3/+4
| | | | | | | backend name can have $1 or such. Also added comments to discourage such characters in backend names. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110671
* Reverted r96516, manually, per CR. Moved maybeDoTransform() code back into ↵Aaron Schulz2012-02-031-92/+74
| | | | | | | transform(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110641
* r110253: reworded "expensive" cache fields and function per CRAaron Schulz2012-02-011-13/+13
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110534
* Fix doxygen docs before REL1_19 branchingAntoine Musso2012-02-011-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110518
* Quick fix to getContainerHashLevels() comparison from r110435.Aaron Schulz2012-02-011-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110462
* * Documentation fixTim Starling2012-02-011-2/+2
| | | | | | | * Binary mode on php://output, for consistency. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110459
* Expanded 'shardViaHashLevels' config var in FileBackendStore to be able to ↵Aaron Schulz2012-01-312-27/+44
| | | | | | | recognize FileRepo-style deleted zone hash paths (which are different than for the other zones). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110435
* * r108353: Made FileBackendMultiWrite consistency checks configurable.Aaron Schulz2012-01-303-13/+25
| | | | | | | * Removed redundant code from r110259 and added a comment to isValidContainerName(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110269
* Renamed FileBackend to FileBackendStore and ugly FileBackendBase to ↵Aaron Schulz2012-01-297-129/+128
| | | | | | | FileBackend. Callers doing things like FileBackend::extensionFromPath() are now more proper. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110261
* In FileBackendBase/FileBackend:Aaron Schulz2012-01-292-109/+127
| | | | | | | | | | | | * Moved some public static functions from FileBackend to FileBackendBase as the later defines the public API. * Made splitStoragePath() return null if the backend or container name is empty. * Made normalizeContainerPath() kill leading directory separators. * Added more unit tests and made some documentation tweaks. In FSFileBackend: * Added resolveContainerName() to disallow '.' a container name, since this would cause a traversal. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110259
* * Split up process cache in FileBackend into separate arrays for expensive ↵Aaron Schulz2012-01-292-33/+38
| | | | | | | | | | | and inexpensive entries. Put the local reference FSFile object cache in the former since it takes up disk space on /tmp. * Removed FileBackendBase::resolveWikiId(); doesn't really work well with FileBackendMultiWrite and the functionality is best handled in resolveContainerName(). Follows-up r108303. * Gave FileOp::doAttempt() a default implementation (a no-op) to be more libertarian. * Some documentation tweaks. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110253
* Added addMissingMetadata() function to SwiftFileBackend to retroactively add ↵Aaron Schulz2012-01-291-4/+34
| | | | | | | metadata (sha1) on the fly. This can be useful if files were imported from some script that doesn't set the metadata. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110230
* Fix unused variablesSam Reed2012-01-281-0/+2
| | | | | | | | | | | Fix trailing whitespace Add/Improve documentation Explicit member variable declaration Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110218
* Follow-up r110159: set the FilesystemIterator flags when that class is ↵Aaron Schulz2012-01-271-1/+11
| | | | | | | available (PHP >= 5.3). Apparently, some versions of PHP 5.3 have different defaults that others for SKIP_DOTS. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110163
* * Reverted r108194 to support PHP < 5.3. These should already be the default ↵Aaron Schulz2012-01-271-4/+6
| | | | | | | | | iterator settings. * Also made the iterator keys (e.g. in foreach) more consistent by being integers as the other backend iterators do. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110159
* r107980: added missing dir param to FileBackendShardListIteratorAaron Schulz2012-01-271-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110154
* r107980: added missing dir param to FileBackendShardListIteratorAaron Schulz2012-01-271-4/+5
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110153
* Fix spurious character from r110122Sam Reed2012-01-271-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110127
* Self-revert r110124, needs more than that to support 5.2 since $flags don't ↵Chad Horohoe2012-01-271-9/+1
| | | | | | | | | | exist in 5.2. Either this needs to be fixed to really support 5.2 or we'll bumping the minimum version to 5.3 this release. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110126
* Add documentationSam Reed2012-01-273-4/+11
| | | | | | | Fix whitespace Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110125
* Copy FilesystemIterator constants so we can still pretend to support 5.2Chad Horohoe2012-01-271-1/+9
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110124
* $this->substPaths takes 2 parametersSam Reed2012-01-271-1/+1
| | | | | | | | | protected function substPaths( $paths, FileBackend $backend ) { Pass $backend from the for loop Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110123
* Fix undefined $dirRootSam Reed2012-01-271-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110122
* In FileBackendBase/FileBackend:Aaron Schulz2012-01-261-7/+34
| | | | | | | | | * Added normalizeStoragePath() function. Use it for normalizing paths in the stat cache. This way, if someone clears a non-normal form of path from the cache, it will actually work as expected. * Removed 'abstract' flag from FileBackendBase::clearCache(). * Documentation tweaks. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110084
* Further reduced RTTs in SwiftFileBackend by making "file already exists" ↵Aaron Schulz2012-01-261-28/+27
| | | | | | | checks use the stat cache, typically already set in FileOp::doPrecheck(). FileBackendBase::doOperationsInternal() already clears the cache after locking (and before FileOp::attemptBatch) for consistency. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110073