| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Use name constants instead of string literals in calls to Config::get
and ServiceOptions::get, when referring to core configuration variables.
This protects against typos and makes the decumentation and schema
declaration of the config settings discoverable.
This is the first batch, only touching files directly under /includes/
Change-Id: I7252e636c7c86d950d9257b33491af492c6dd5eb
|
|
|
|
|
|
|
|
| |
Also check for false if needed
Found by phan strict checks
Change-Id: I298204653dfb788515a87978dd8705b6e4f9c775
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
|
| |
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of our wider work on modernising and making more welcoming the
language we use within and around MediaWiki, now is a good time for us
to rename these configuration variables:
- $wgFileBlacklist is now $wgProhibitedFileExtensions
- $wgMimeTypeBlacklist is now $wgMimeTypeExclusions
- $wgEnableUserEmailBlacklist is now $wgEnableUserEmailMuteList
- $wgShortPagesNamespaceBlacklist is now $wgShortPagesNamespaceExclusions
Bug: T277987
Depends-On: I91e065c58fda144a722a41cf532e717f962d7a64
Change-Id: I558a8b20d67d48edccce0d065aec2d22992e9dda
|
|
|
|
|
| |
Bug: T277987
Change-Id: Iafc4b3e3137936046487119b7e17635f4e560277
|
|
|
|
| |
Change-Id: I066d3e322c6e6c7da315ea81ffa9530571e9e565
|
|
|
|
|
|
|
| |
Follow-up to I93bd71ec1.
Bug: T252228
Change-Id: I45c9fc592c9e41e0868e7d965206d4c04f4f92e1
|
|
|
|
| |
Change-Id: I157220c4e9ff516283a60f06af99efa2439332e3
|
|
|
|
| |
Change-Id: I27dc0c8a1a184571ed96abdea22af953510457cd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
StreamFile::parseRange() and StreamFile::send404Message() are now replaced
by HTTPFileStreamer::parseRange() and HTTPFileStreamer::send404Message().
Change-Id: Id777211de42a225361ce068adaab64e3ddc03fdc
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replaced usage of StreamFile::STEAM_HEADLESS (now making it unused) by
HTTPFileStreamer::STREAM_HEADLESS. Also, deprecated these unused constants.
Searched around and found nothing and CS also says so too;
https://codesearch.wmflabs.org/search/?q=StreamFile%3A%3A(STREAM_ALLOW_OB%7CSTREAM_HEADLESS)&i=nope&files=&repos=
Change-Id: Ia3fc2cf072fa2fddb910c64a547d12cb243290d5
|
|/
|
|
| |
Change-Id: I51d233e80c4b0cebc269b54629582d4cf76e186f
|
|
|
|
| |
Change-Id: Ieed41b5d6b0f568fe2872e7754f2feae7868fe7a
|
|
|
|
|
|
| |
Enable the phpcs sniffs for this and used phpcbf
Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925
|
|
|
|
|
|
|
| |
* Move most StreamFile code to this new class
* Remove StreamFile depedency from FileBackendStore
Change-Id: I4a272ef49497b589114fc2b37ba800bc26d9161f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
Fix issues found by MediaWiki.WhiteSpace.SpaceyParenthesis sniff.
Bug: T102617
Change-Id: Iec7f71e64081659fba373ec20d9d2006306a98f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also:
* Update wfHttpError() to use uppercase DOCTYPE, to match other code
such as Html.php, wfThumbError(), HttpError.php, etc.
Change-Id: I4027e7fe1a138b03f78797b6d1bfe7bd1064d360
|
|
|
|
| |
Change-Id: I31c81c78715048004fc8fca0f27d09c1fa71c118
|
|
|
|
|
|
|
|
|
|
|
| |
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
|
|
|
|
| |
Change-Id: Ibf86d03b5479c47ee72c0dafea6777ef8178fe68
|
|
|
|
|
|
|
|
|
|
|
| |
The Line continuation Coding conventions prefers the closing parenthesis
on the same line than the beginning curly braces. This is done for ifs
and functions.
Also move some boolean operator from the end of a line to the beginning
and changed some indentation to make the condition hopefully better
readable.
Change-Id: Id0437b06bde86eb5a75bc59eefa19e7edb624426
|
|
|
|
| |
Change-Id: I1d830da0597f19efd0b2ae48642389975e736e23
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
|
|
|
| |
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.
Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
|
|
|
|
|
|
| |
* Previously, thumbnails could have a hex tmp file name as the disposition.
Change-Id: I495860dc54c02d2b3e053e998a41674cd6d07f2f
|
|
|
|
| |
Change-Id: Id402f077037f3e84c9158f7d48be0ed82ba4a1cf
|
|
|
|
|
|
| |
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.
Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/112381
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/112378
|
|
|
|
|
|
|
|
|
| |
bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111048
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 'b' param in some fopen() calls as needed for Windows and newline handling.
* Removed some useless padding code in FileBackend::getContainerShard(). Initialized $m to make IDE happy.
* Updated some code comments.
In SwiftFileBackend:
* Manually set the ETag when using php-cloudfiles for creating files to avoid https://github.com/rackspace/php-cloudfiles/issues/59.
* Manually set the content type based on how StreamFile::getType(). This makes it safe to read files directly out of the proxy to end-users. The streamFile() backend functions already uses a similar content-type check.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109980
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109961
|
|
|
|
|
|
|
| |
* Code comment tweaks and fixes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109106
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added getFileSize()/getFileStat() functions. Refactored some functions to use the stat function for better reuse and caching/consistency.
* Refactored streamFile() to allow for subclasses to avoid local file copying with less duplication. Also make last-modified check actually work since we always get the timestamp of the original file.
* Renamed 'ignoreErrors' parameter to 'force'.
In FileBackendMultiWrite:
* Simplified how read ops are done (use 'master' backend for consistency).
* Added consistency check to doOperationsInternal() to check if the files are synced.
* Various fixes after testing.
In StreamFile:
* Split out prepareForStream() function from stream() in StreamFile for code reuse.
In FileBackendTest:
* Properly cover FileBackendMultiWrite in tests.
* Various test improvements.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108353
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108107
|
|
|
|
|
|
|
|
| |
* Replaced unused $request param with $sendErrors to suppress sending error messages
* Added boolean return value (success/failure)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103742
|
|
|
|
|
|
|
|
|
| |
extensions use it afaict), leave wfStreamFile() as a b/c alias for now.
Yay less global functions, autoloading and less manual require()s.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94427
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91743
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89047
|
|
|
|
|
|
|
| |
Getting bored of this tonight now I think...
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88543
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/77393
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sed -i 's/$wgContLanguageCode/$wgLanguageCode/g'
These are now the same, always. Per and since r15827.
$wgLanguageCode wins due to being the one set by LocalSettings.
$wgContLanguageCode definition at includes/Setup.php kept for now.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/72561
|
|
|
|
|
|
|
|
| |
* Added some descriptions
* Added @file where needed
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/71078
|
|
|
|
|
|
|
| |
Removal of one setting of a variable to '', then not using further
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/69839
|