| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: If490f64bec282e5dfcdaf7feb1cbf46d3dce1064
|
|
|
|
| |
Change-Id: Ib8ab9edd1afdb28f7444f5e13cf34a696a066234
|
|
|
|
|
|
|
| |
* Move most StreamFile code to this new class
* Remove StreamFile depedency from FileBackendStore
Change-Id: I4a272ef49497b589114fc2b37ba800bc26d9161f
|
|
|
|
|
|
|
|
|
|
| |
* Inject a PSR logger in place of wf* logging methods.
* Replace wfTimestamp() call with ConvertableTimestamp.
* Inject the Profiler object.
* Rename $wiki => $domain to avoid "wiki" mentions.
* Remove stray FSFile::extractImageSizeInfo() method.
Change-Id: I3e3a43d36506bec341dc5727b52f5f5a5d32bff5
|
|
|
|
|
|
|
|
| |
Use standard exceptions for unexpected errors and remove
FileBackendException class, leaving FileBackendError. The
later is actually intended to be caught in some cases.
Change-Id: I735a525e0b14e518b2da5f18762e0f293064dfc2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This avoids code duplication.
* Callers can safely start type-hinting StatusValue as well.
* Also moved the wrap() logic out of Status::__construct(), which
only wrap() was (and should have been) using. Use "static" as
well, so subclass behave properly.
* The docs and type-hints in /filebackend are updated as an example.
* A migration pattern is to inject a StatusValue wrapper
into the backend and use it on all returned statuses, so MediaWiki
will still get Status for message methods.
Change-Id: Iff9255f34870ea6b0c4b91f6ddc69eea95186aba
|
|
|
|
| |
Change-Id: I01bfdb8e0bfaa132533732873f7c840cea7935eb
|
|
|
|
| |
Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added HTTP options headers parameter to streamFile().
* Refactored doStreamFile() to either call StreamFile::stream()
or delagate that to the subclass. SwiftFileBackend now relays
the full Swift response rather than manually making the headers.
This also makes Range headers easy to support.
* Made use of this in img_auth.php for performance on private wikis.
* Elimate stat call in streamFile() for Swift if "headers" is empty.
* Refactored StreamFile a bit to inject request headers instead
of using the $_SERVER global. A header options parameter is used
instead, which also supports Range.
* Removed now unused prepareForStream().
* Cleaned up streamFile() unit tests.
Change-Id: I2ccbcbca6caabb8cf65bd6b3084cede2e6ea628a
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
| |
Change-Id: Iadab3d018c3559daf79be90edb23d131729bdb68
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The content type detector will now inspect the file contents
to better handle extensionless files.
Also dependency inject the callback and make the default one
use FileInfo.
Change-Id: Iad59bf6c6a416b706f976a4c425763fd30e2debb
|
|/
|
|
|
|
|
|
| |
Normalize all headers to lower case at the start of the
FileBackend operation methods. This makes it easy for
subclasses to check for certain headers, e.g. content-type.
Change-Id: Ia69976326d17a51bcaa61f2781aa669ae7bd9c28
|
|
|
|
| |
Change-Id: I7d040c5a914574df72fa31612df0eb28e15fd46c
|
|
|
|
| |
Change-Id: I2f0a1885803fff9dc0eb8ca4a595a83736ce421b
|
|
|
|
|
|
|
|
| |
* Just return the ScopedLock itself without wrappig it in an array.
This also makes getScopedLocksForOps() actually return the correct
type according to the docs
Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552
|
|
|
|
|
|
|
|
|
|
|
| |
* This character in $wgDBname seems to be common enough.
The wiki ID is the default container prefix, and if it
is not accepted, then confusing errors occur that block
all file uploads. The case of dots is handled now.
* Improved variable naming in resolveStoragePath().
Bug: T46066
Change-Id: I68458a876855894d01e8cf880bd6cfcfdae17bd0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
|
|
|
|
|
| |
Bug: T93141
Change-Id: I76efb0dc45a697c5fdfc50932e1198a6d663a445
|
|\ |
|
| |
| |
| |
| |
| |
| | |
A pure documentation patch. Should almost be a no-brainer. ;-)
Change-Id: I9bf4d6056f7cde193fe5882a04a7973af9b5a7f4
|
| |
| |
| |
| |
| | |
bug: T89184
Change-Id: I035c0f85a641efa0e4e3209b2bcf9847c08ab0d2
|
| |
| |
| |
| | |
Change-Id: I31c81c78715048004fc8fca0f27d09c1fa71c118
|
|/
|
|
| |
Change-Id: If69de34a046f4f33fc57b93beaf264f522ce7386
|
|
|
|
| |
Change-Id: I9c0088b9aab37335203cad45a1d6fa8ac3f43321
|
|
|
|
|
|
|
|
|
|
| |
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I41a84e8e1dec39170aa655250325ffc485eaeaef
|
|
|
|
|
|
|
| |
Always use lowercase @todo
Changed some "@FIXME" to "@todo FIXME: "
Change-Id: I016d1f9511e6f3bbd22427f0fffeccd77ab5e0db
|
|
|
|
|
|
|
|
|
|
| |
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma
Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
|
|
|
|
|
| |
Bug: 66467
Change-Id: Iaf8eb2ecfad166e26e265a98933399dc4bc255a3
|
|
|
|
|
|
| |
* This partly follows up on 2cfce9f
Change-Id: I9d15f44d8000f52fd7b307d358c895452ee96a8d
|
|\
| |
| |
| | |
FileBackend::doOperationsInternal"
|
| |
| |
| |
| | |
Change-Id: I60f71155abcf7f69423639b10ec301ac192df728
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* The preloadFileStat() call acts as a good canary for whether all
affected servers are up. If anything failed in it, then it's not
worth bothering to send the actual write requests.
* Also made FileBackend::preloadFileStat abstract while at it since
the two subclasses implemented it and so should any others.
* Fixed a silly comment typo.
Change-Id: I5bd427f654aa4a9d6bfe4ed7566276e8ac520b30
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I8804ebe0922d3a414863b162a2110e0b9e49b80f
|
|/
|
|
|
|
|
| |
Changed closure to capital word Closure in doc and type hint,
also changed callback in docs to callable
Change-Id: I52c8e8f13d38a837052101c38b9986be780ca057
|
|
|
|
|
|
|
|
| |
* Let "latest" stat entries override non "latest" so
that future getFileStat() calls with the "latest" flag
can actually have a cache hit.
Change-Id: I1e9391039537d608b89773b4d51575e3b364a751
|
|
|
|
| |
Change-Id: Ic3b764363e91c3279d3dc017ddce630dae26bec5
|
|
|
|
|
|
|
|
| |
* Make sure that global backends do not prefix the cache keys
with local wiki IDs for container and file stat entries.
This causes fragmentation and breaks invalidation.
Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This adds a new preloadFileStat() method to FileBackend.
* FileBackend::doOperations() makes use of this instead of primeFileCache().
The later was mostly useless due to the 'latest' flag, which stat entries
rarely had (and since they use add(), 'latest' ones do not override the
non-'latest' ones).
* Simplified primeContainerCache/primeFileCache to no longer accept
FileOp objects and made sure nothing passes those in anymore.
Change-Id: Iee3878cadd69c3a594c701c0aff81aab5f473de5
|
|
|
|
| |
Change-Id: I18aff576262479c9bb1c56eb8e1d1aaae200e4b1
|
|
|
|
| |
Change-Id: Ia0dec914208cb3100b7f5bbd2291985eac05dc02
|
|
|
|
|
|
|
| |
* This can be useful for carrying over metadata when copying files around
* Also fixed a bug in sanitizeHdrs() for Swift (broken content-disposition)
Change-Id: I4534e9acac2b306086797b3677f85c05b98e39fc
|
|
|
|
|
|
| |
* Split out FileBackendException class and reduced direct use of MWException
Change-Id: I325c1798b6d90972c12a5dccc37989af34d857f3
|
|
|
|
| |
Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5
|
|
|
|
|
|
| |
Just count if there are array members
Change-Id: I4f9cc8ba554404796822317fdb285e2f560d01dd
|
|
|
|
| |
Change-Id: I2113aecc53f1b361d9c276113bc0a9f7076cd21c
|
|
|
|
| |
Change-Id: Ie69c324e2f1ea0b8a654adee06ebda494cebd10c
|
|
|
|
| |
Change-Id: Idd57e8d7fff56c62a66c7fcaf4627b9096f0c363
|