| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I07ce1f37d1bfb18d6e73dd008a712b3ca60a80e9
|
|
|
|
|
|
|
|
|
|
|
|
| |
During a stashed upload, the SHA1 has already been calculated and
is populated based on data saved in DB. Reuse that value in
verifyPartialFile() instead of recalculating as SHA1 can take a
long time to calculate for large files.
This should improve the speed of PublishStashedFile jobs.
Bug: T200820
Change-Id: Ie2967c636b2f942921a125ef62d1a466c6035ca0
|
|
|
|
|
|
|
| |
This has been approved as part of RFC T166010
Bug: T321882
Change-Id: I6bbdbbe6ea48cc1f50bc568bb8780fc7c5361a6f
|
|
|
|
|
|
| |
Doc-only changes
Change-Id: Ice974b3ba41708859dfe646e94b31c5ebbf26410
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
|
|
| |
This patch only adds and removes suppressions, which must be done in the
same patch as the version bump.
Bug: T298571
Change-Id: I4044d4d9ce82b3dae7ba0af85bf04f22cb1dd347
|
|
|
|
|
|
|
| |
Addition and remove of suppression needs to be done with the version
update.
Change-Id: I3288b3cefa744b507eadebb67b8ab08c86517c1c
|
|
|
|
|
| |
Bug: T283196
Change-Id: I4096d60d5a6e5988794ced6a5607edafab20c116
|
|
|
|
| |
Change-Id: Ie36c4695c8a7f9986f3f25eaf0464afbe408d808
|
|
|
|
|
|
| |
Reformat existing documentation to match the format
Change-Id: I190b54b5e962f17bab6502dd1b3c02f11dc926d2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A terminating line break has not been required in wfDebug() since 2014,
however no migration was done. Some of these line breaks found their way
into LoggerInterface::debug() calls, where they mess up the formatting
of the debug log.
So, remove terminating line breaks from wfDebug() and
LoggerInterface::debug() calls.
Also:
* Fix the stripping of leading line breaks from the log header emitted
by Setup.php. This feature, accidentally broken in 2014, allows
requests to be distinguished in the log file.
* Avoid using the global variable $self.
* Move the logging of the client IP back to Setup.php. It was moved to
WebRequest in the hopes that it would not always be needed, however
$wgRequest->getIP() is now called unconditionally a few lines up in
Setup.php. This means that it is put in its proper place after the
"start request" message.
* Wrap the log header code in a closure so that variables like $name do
not leak into global scope.
* In Linker.php, remove a few instances of an unnecessary second
parameter to wfDebug().
Change-Id: I96651d3044a95b9d210b51cb8368edc76bebbb9e
|
|
|
|
| |
Change-Id: Iceec961de4f0cc689f7d3b981afac923b46c98f6
|
|
|
|
|
|
| |
When they're not used outside of the scope where they're defined.
Change-Id: I5ca1de8420c1180bf7f5d9f28f2a7402a256adf8
|
|
|
|
| |
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
|
|
|
|
| |
Change-Id: If6bc31d7398c68320a6633b045c33279bf6f8dbd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UploadBase:
* Introduce a new method, tryStashFile(), as a replacement for the
now-soft-deprecated stashFile(). The method runs the new hook and
returns a Status object, with an error (if the hook returned an
error) or a value (if it didn't).
* Introduce a new hook, UploadStashFile, allowing extensions to
prevent a file from being stashed. Note that code in extensions
which has not been updated for MediaWiki 1.28 may still call
stashFile() directly, and therefore not call this hook. For
important checks (not just for UI), extension authors should use
UploadVerifyFile or UploadVerifyUpload hooks.
* Extract common code of tryStashFile() and stashFile() to
a new protected method doStashFile().
SpecialUpload:
* Use tryStashFile() when stashing a file after a warning or
"recoverable error" was encountered.
ApiUpload:
* Refactor stashing code so that error handling only happens in one
place, not four different ones. Use Status objects rather than
exception throwing/catching for control flow.
* Simplify the error messages slightly (error codes are unchanged).
Produce better ones by always using handleStashException().
'stashfailed' is now always at root (not nested inside 'warnings'),
behaving the same as 'filekey' does on success.
* Use tryStashFile() when stashing. Handle errors so as to allow
custom API results passed via ApiMessage to be preserved.
Some API result changes for different requests are shown below.
api.php?action=upload&format=json&filename=good.png&file=...&stash=1
Before:
{
"error": {
"code": "stashfilestorage",
"info": "Could not store upload in the stash: Stashing temporary file failed: UploadStashFileException Error storing file in '/tmp/phpB32SRT': Could not create directory \"mwstore://local-backend/local-temp/3/3a\".",
"*": "See http://localhost:3080/w/api.php for API usage"
}
}
After:
{
"error": {
"code": "stashfilestorage",
"info": "Could not store upload in the stash: Error storing file in '/tmp/phpB32SRT': Could not create directory \"mwstore://local-backend/local-temp/3/3a\".",
"*": "See http://localhost:3080/w/api.php for API usage"
}
}
api.php?action=upload&format=json&filename=[bad].png&file=...
Before:
{
"upload": {
"result": "Warning",
"warnings": {
"badfilename": "-bad-.png",
"stashfailed": "Stashing temporary file failed: UploadStashFileException Error storing file in '/tmp/phpB32SRT': Could not create directory \"mwstore://local-backend/local-temp/3/3a\"."
}
}
}
After:
{
"upload": {
"result": "Warning",
"stashfailed": "Could not store upload in the stash: Error storing file in '/tmp/phpB32SRT': Could not create directory \"mwstore://local-backend/local-temp/3/3a\"."
"warnings": {
"badfilename": "-bad-.png",
}
}
}
Bug: T140521
Change-Id: I2f574b355cd33b2e9fa7ff8e1793503b257cce65
|
|
|
|
| |
Change-Id: I4c60083a4e773e401aae8c90b99a051cbca4c961
|
|
|
|
|
|
| |
Also, makes code shorter!
Change-Id: I144d8a207c753bd9e38ac847a0fc61257f11e54d
|
|
|
|
| |
Change-Id: I048ccb1fa260e4b7152ca5f09b053defdd72d8f9
|
|
|
|
| |
Change-Id: I8cf59cd3bb6dd8de2ed6509b7bc2ef9ff7c5caf1
|
|
|
|
| |
Change-Id: Ib0f02202d075d4a56dc4e37b08d7ac9399e8c86c
|
|
|
|
|
|
| |
Also, verify file before stashing it
Change-Id: Ib2474cb778d53959a4f479e53d0392f916b18d83
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
|
|
|
|
|
|
|
| |
There's no obvious reason for this method to be private while
it's pretty handy to have it in hooks.
Change-Id: If716665a939e8fe84288354ee8c16369604b67fb
|
|
|
|
|
|
| |
* This works similarly to the async concatenation code.
Change-Id: Iae38b93d65182158561b92168af51a1e9f50374c
|
|
|
|
|
|
|
|
| |
1) UploadStashTest::testValidRequest
Declaration of UploadFromStash::stashFile() should be compatible with
that of UploadBase::stashFile()
Change-Id: If94ab8b718e23b50a1b67ba0fac3ea24926d5950
|
|
|
|
|
|
|
| |
* We already compute the props when stashing, so including that in a column
lets us reuse it later when the stashed file is to be published.
Change-Id: I3d6adb6528f1e992d8986058806e745c4e1c0300
|
|
|
|
|
|
| |
Including hint for bug 39195
Change-Id: I4cdab97011330c12a943112f6c05134362d26a82
|
|
|
|
|
| |
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"
This reverts commit ee0d3d330f76b97c451c168dc9b052ee84609b5b
|
|
|
|
|
|
| |
help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
|
|
|
|
|
|
| |
Also made file/class documentation more consistent.
Change-Id: Ia1a7230adc92079b505362317d2e03b36130cc8b
|
|
|
|
| |
Change-Id: If964ce2f39904f1e9e3101e7cafaa6a96d58adfc
|
|
|
|
|
|
|
|
|
| |
bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111072
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/110943
|
|
|
|
|
|
|
|
|
|
| |
with i18n documentation dont break phpunit
follow up r93720
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104687
|
|
|
|
|
|
|
| |
error. This cripples our CI system, we can't detect new failures this way.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104680
|
|
|
|
|
|
|
|
| |
follow up r93720
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104659
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/99975
|
|
|
|
|
|
|
|
|
|
|
| |
Documentation
Fix "/*" comments to "/**"
Flesh out some missing returns, change some return types
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/99808
|
|
|
|
|
|
|
|
|
| |
which broke stashing in SpecialUpload in some cases.
Fixes bug 30505
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95581
|
|
|
|
|
|
|
|
| |
1. When the user isn't passed to UploadFromStash::__construct(), it would break when it shouldn't.
2. When stashing files, sometimes an instance of UnregisteredLocalFile would be returned instead of UploadStashFile
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94966
|
|
|
|
|
|
|
|
|
| |
Catrope's suggestions.
followup to r94536, r94592, r94594
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94670
|
|
|
|
|
|
|
|
|
|
| |
stash row creation a great deal.
Updated UploadFromUrlJob to properly use the database stash
followup to r92200
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94594
|
|
|
|
|
|
|
| |
followup to r94536
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94540
|
|
|
|
|
|
|
|
|
| |
removed spurious use of empty()
listFiles() was broken, now works
followup to r92009
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94536
|
|
|
|
|
|
|
|
| |
using UploadStash to track the unfinished upload.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93720
|
|
|
|
|
|
|
| |
remove database records for files that move out of the stash
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92213
|