It was so close already, it seemed like an effort was being made.
Unfortuately it is not possible to use @phpcs-require-sorted-array
since it breaks ReflectionClassConstant::getDocComment().
Change-Id: I296bb333a49adc973f65b094b727edf7f6143ba1
Since the default for wgParserEnableLegacyMediaDOM is now `false`, this
config will also be set to `false` and wikis can enable it while it's
still necessary.
The plan will be to gradually roll this change out, as was done for
wgParserEnableLegacyMediaDOM, to develop a migration path for templates
and extensions that mimic the legacy media output.
We can start on officewiki.
Bug: T318433
Change-Id: I70e537b2beb99de9a41e7dc66a0d60a508009887
As a first pass, inject various services into the job as this is
now supported by JobFactory.
The second pass will have to survey callers of fixRedirects() and
pass in various services that would be used in the static method.
Also, we need to do same for getFinalDestination() which needs a
DBLoadBalancerFactory service.
Bug: T265942
Change-Id: If61a32b6ce32dc934533603a0e99414ab5771909
Add a switch that allows toggling between inline and two-column format
when Wikidiff2 is installed.
Inline toggle should also support no-JS toggling
The legend should toggle when switching from table to inline after the
first load.
Introduced a temporary feature flag to show this inline toggle so that
we can merge and easily continue the improvements. It will be removed
when ready for production.
Bug: T336712
Bug: T330229
Change-Id: Ie6a48e495f2bb299d8b984e7c40363d534c7915b
- Update the count of HookRunner (since d04f0409)
- Hooks::runner() is deprecated (f452ffe9), should be removed from doc
- hooks.txt is a stub only, history are still in git if needed
Change-Id: I483f249a20853a42767646dc91f50e6187c51c7f
This was a temporary flag to allow setting the migration stage for a
comment migration with a temp table.
Since the rev_comment_id migration is done, this is no longer needed.
Dropping the compatibility code for temp tables will be done in
follow-ups.
Bug: T299954
Change-Id: I290a74f27b05cd7e062dda78766911ffe3053d08
- [x] Add Wikimedia Icons to project
- [x] Fetch Interwiki icons if they exist
- [x] Fallback to previous functionality for icons not available in OOUI
- [x] Create config to override icons
Bug: T315269
Change-Id: I5d904e467a978847bbc9af65fdba1ef729068993
Add wgSVGNativeRendering to allow clientside rendering of SVG files
Default is false. When enabled with true, will serve ALL SVG files
as is to the browser.
When set to the string 'partial' it will conditionally serve SVG
files based on criteria. Currently it will force PNG rasterization
for translated SVGs and for SVGs over wgSVGNativeRenderingSizeLimit
wgSVGNativeRenderingSizeLimit is a byte size limit to avoid larger
SVG files (potentially much bigger than a PNG) from being served
directly to browser.
Native SVG rendering does not provide PNG fallback. SVG support in
browsers has evolved far enough that this should rarely be a problem.
Bug: T208578
Change-Id: I9647fdd72f868c821eb20f67b239826f23655a1c
To implement source maps, we want FileModule::getScript() to return
an array with path information, but that would break subclasses of
FileModule which concatenate to the return value of parent::getScript().
So allow scripts to be generated by a callback, eliminating the need for
concatenation in subclasses.
* Factor out most of the loop body of expandPackageFiles() into
expandFileInfo(). Add 'name' to the return value. Ensure 'filePath'
is always a FilePath object since we need that to safely return it
to ResourceLoader later. Document the return value.
* Make sure the base path is always set in FilePath objects returned by
expandFileInfo().
* Factor out the loop body of the final stage of file info expansion
into readFileInfo(). Retain filePath, do not unset it.
* Assert that $fileInfo['content'] is definitely set.
* Convert array_map() in getDefinitionSummary() to a loop.
* Migrate LanguageDataModule.
Bug: T47514
Change-Id: I97d61b5793159cea365740e0563f7b733e0f16de
Add an extension/skin attribute and a command line option for
manageForeignResources.php, for management of an extension's or
skin's foreign resources. This is less clumsy and more
introspectable than each extension/skin creating its own copy
of manageForeignResources.php.
Bug: T330508
Change-Id: I5df95ea4799d0efce60b58a35cb916c8e0f555b0
The UA sniffs that overrode the feature tests are no longer needed.
* MSIE 10: Fine, rejected by feature checks.
* UC Mini "Speed Mode": Redundant, the version that this sniff
matched is pre-ES6. Current versions of UC Mini don't appear to
support enabling "Speed Mode" on random websites nor does it offer
it for Wikipedia specifically.
Details at https://phabricator.wikimedia.org/T178356#8740573.
* Google Web Light: Redundant, shutdown as of 2022.
Any references or extensions that still reach the proxy, get
redirected to our online URLs
https://googleweblight.com/?lite_url=https://en.m.wikipedia.org/wiki/Bananahttps://phabricator.wikimedia.org/T152602https://en.wikipedia.org/wiki/Google_Web_Light
* MeeGo: Redundant, discontinued and presumed rejected.
Either way, unsupported.
* Opera Mini: Fine, rejected by checks.
Details at https://phabricator.wikimedia.org/T178356#8740573.
* Ovi Browser: Redundant, discontinued and presumed rejected.
Either way, unsupported.
* Google Glass: Improve UX (since 2013, T58008).
* NetFront: Redundant. Old versions are presumed rejected.
Current versions are Chromium-based and presumed fine.
The exclusion was not UX based, but due to jQuery explicitly not
supporting it in 2013. This is no longer the case, so we can let
the feature test lead the way here.
* PlayStation: Redundant, same story as NetFront.
The version that matched the sniff is presumed rejected.
Current versions probably fine, but even not, don't match
our sniff so are already enabled today.
Bug: T178356
Change-Id: Ib6263ce3ffd11af5e501de8857f3e48a248c6210
This is an initial quick-and-dirty implementation. The
ParsoidParser class will eventually inherit from \Parser,
but this is an initial placeholder to unblock other Parsoid
read views work.
Currently Parsoid does not fully implement all the ParserOutput
metadata set by the legacy parser, but we're working on it.
This patch also addresses T300325 by ensuring the the Page HTML
APIs use ParserOutput::getRawText(), which will return the entire
Parsoid HTML document without post-processing. This is what
the Parsoid team refers to as "edit mode" HTML. The
ParserOutput::getText() method returns only the <body> contents
of the HTML, and applies several transformations, including
inserting Table of Contents and style deduplication; this is
the "read views" flavor of the Parsoid HTML.
We need to be careful of the interaction of the `useParsoid` flag with
the ParserCacheMetadata. Effectively `useParsoid` should *always* be
marked as "used" or else the ParserCache will assume its value doesn't
matter and will serve legacy content for parsoid requests and
vice-versa. T330677 is a follow up to address this more thoroughly by
splitting the parser cache in ParserOutputAccess; the stop gap in this
patch is fragile and, because it doesn't fork the ParserCacheMetadata
cache, may corrupt the ParserCacheMetadata in the case when Parsoid
and the legacy parser consult different sets of options to render a
page.
Bug: T300191
Bug: T330677
Bug: T300325
Change-Id: Ica09a4284c00d7917f8b6249e946232b2fb38011
The 7% increase in css shipped is because of styles added for the
content-media feature, without dropping content-thumbnail. This is
noted in T297984#8525146
Getting rid of content-thumbnail won't be possible until templates and
extensions that mimic the parser output have been migrated, which is
being worked on in T318433.
Bug: T314318
Bug: T297984
Bug: T318433
Depends-On: Ib54b49d546423dd1b4416c82585bbb686950b29c
Change-Id: Ic587b1b9b8d22f3aef38e8823613815faaa09d9d
Split concepts of "match pattern" and "reserved pattern". Add config
"reservedPattern" which specifies a username pattern to be denied for
creation, but unlike matchPattern, it does not immediately flag all
accounts with such names as temp accounts. This can be used before
migration or after rollback to safely prevent creation of conflicting
accounts.
* Add TempUserConfig::isTempName(), which does what isReservedName()
previously did, i.e. determines if a name is a temp username.
* Make TempUserConfig::isReservedName() return true if the name matches
either the match pattern or the reserved pattern.
* UserNameUtils::isTemp() continues to determine whether a username is
actually a temp username.
* Add UserNameUtils::isTempReserved() as a proxy for
TempUserConfig::isReservedName()
Bug: T307064
Change-Id: I26755731fad89530a06824181106cd7b4e077d9e
* Use IConnectionProvider
* Inject services into the job
* Use JobSpecification to avoid unnecessary service construction
Bug: T27482
Change-Id: I75ac8c53b874742a3a54526692767d0f549e5259
We always wrap the local cluster cache, and there are no subclasses
of WANObjectCache. It was never documented or recommended how these
would be used. It is a left-over from the original 2015 Multi-DC plan
in which WANObjectCache would work differently. See task for details.
Note that this requires no configuration changes, even in the
theoretical case of these variables being used, as the only
option is to use the main cache, and that's also the default.
* Update WAN overrides to override the underlying main cache
instead.
* Fix EditPageTest which was previously implicitly using a 'hash'
as main cache but also relying on wan cache to be 'none'.
The part that it actually needs is the 'none'. When WAN cache is
enabled, testUpdateNoMinor fails due to an edit conflict because
one of the edits it makes is made with a current timestamp whereas
it expects to simulate wpEdittime in the year 2012 which, when
caching is enabled, is ignored and becomes the current time instead.
I don't understand exactly why, but I'm going to conserve that
behaviour for now.
* Fix TemplateCategoriesTest, which was failing due to an unexpected
cache hit:
> [objectcache] fetchOrRegenerate(…:page:10:…): volatile hit
This could be solved in a more realistic way by splitting the test,
or by explicitly resetting services half-way the test to clear
WikiPageFactory, PageStore and WANCache process state.
For now, keep the prior behaviour of no cache in this test.
Bug: T305093
Bug: T329680
Depends-On: If890622eed0d0f8b4bd73d36ba1815a3d760ea05
Depends-On: Ie1def75208822bdf19bb2cfd7e6edf32c2000e6b
Depends-On: I35cce61dc3ee90dcee3dd6f0b36f84133be029ed
Change-Id: I53781a8c06ebb2583f6ca83dd91bbfe8a5c88b13
This supported mostly IE 6 and 7 as well as some very old Safari
versions against sniffing. Browsers later implemented
X-Content-Type-Options: nosniff which should protect against this
problem.
Bug: T309787
Change-Id: Iea61bd82033551008eb1832fe899ea28ccb23385
* Remove duplicate descriptions from file blocks in favour of class
doc blocks. This reduces needless duplication and incorrect or
outdated copies, and helps to make the file header more consistently
visually ignorable.
* Clean up the file header, similar to other commits under
<https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle>.
Change-Id: I31b137b1d6c75eb042d935b99f92ef47652596ec
Copy the Renameuser extension into core, with minimal code changes. The
hook handlers are inlined into Article, SpecialLog and
SpecialContributions.
Bug: T27482
Change-Id: I314021f4138773df6aaf2753b33ab8283cd16974
This changes the name of the rate limits to match the name of the
corresponding permission:
1) "emailuser" is now "sendemail".
2) "changetag" is now "changetags".
This is done in preparation for merging rate limit checks into Authority.
Backwards compatibility is retained, but the old keys trigger a settings
warning which will be shown by the updater.
Bug: T310476
Change-Id: I59163c88a3f9237ee4592f4b51e3f56359f73fc0
Special:Log allows to have the type, the user or type + user as subpage,
link to this page to show logs from me.
- Special:MyLog redirects to Special:Log/<me>
- Special:MyLog/create redirects to Special:Log/create/<me>
This does not show logs against me (like blocks)
Bug: T327565
Change-Id: Id624cb84d8bbac87d2f820c7c283d4c13866bff5
The currently supported groups are documented in database.md.
While at it, prefer the string form of the $groups parameter where
possible, since the complexity of an array is never utilized, as the
groups either can't overlap, or are decided on by the caller instead.
This also helps with the simpler LBFactory::getConnection() proposed
in T326274.
Bug: T263127
Bug: T326274
Change-Id: I7a31a07a8c3f1e265ac43ab59f23326590b407c3