Commit graph

97786 commits

Author SHA1 Message Date
Gergő Tisza
f871f7b93e
Add WikiPageFactory
Replace WikiPage::factory with a proper factory object with dependency
injection (only for dependencies needed by the factory methods,
not WikiPage itself).

Change-Id: Ie7d6e40d8387d8bc4f8592a31fdd70d0aad510ae
2020-07-27 17:17:21 +02:00
Thiemo Kreuz
9c6473dc1d Reduce nesting by turning big if-else into guard clauses
Change-Id: If3d2f18af0cc7d0f8fe9f764bd4d0e4bae70e440
2020-07-24 11:55:31 +02:00
jenkins-bot
b777cc6b46 Merge "Remove $wgUseTex from DefaultSettings.php" 2020-07-24 07:28:03 +00:00
Translation updater bot
599df1f25b Localisation updates from https://translatewiki.net.
Change-Id: Ia95fb28ca01b0e6edc28bfc0b752a10d495e9ef2
2020-07-24 08:25:58 +02:00
Reedy
729ec629e6 Remove $wgUseTex from DefaultSettings.php
It's orphaned and unused anywhere...

Change-Id: I0f42473e1a3b7a11f2f90aea0df09d179ca2945e
2020-07-24 00:32:42 +01:00
jenkins-bot
769340fe3e Merge "context: Remove duplicate log message from RequestContext::getLanguage()" 2020-07-23 23:24:44 +00:00
Reedy
2ae2c2adde Updating pear/mail_mime (1.10.8 => 1.10.9)
Change-Id: I579e2cc6adb272f7769ee1ce6f9215bf46383b3b
Depends-On: Ia28744930f213ee7fd272c72fe7974e607534232
2020-07-23 22:27:59 +00:00
Timo Tijhof
35d62b19e2 context: Remove duplicate log message from RequestContext::getLanguage()
> A long, long time ago,
> I can still remember how those warnings used to make me smile.
> And, I knew if I had my chance, that I could make those traces dance,
> and... Maybe they'd be present for a while.

Ever since T45086, we have traces for warnings in production
so this is no longer needed. Also it uses getTraceAsString()
which is something we're trying to phase out.

Bug: T233342
Change-Id: I79ce582c7f057b22a9ead2f2b014aba41f869325
2020-07-23 22:10:54 +00:00
jenkins-bot
b25421e4ad Merge "Simplify protect-dropdown a bit" 2020-07-23 21:08:22 +00:00
jenkins-bot
1c036fe8de Merge "Import: use master DB for loading slots." 2020-07-23 20:56:33 +00:00
jenkins-bot
75c9333ddb Merge "Fix broken PHPDoc comments that don't start with /**" 2020-07-23 19:04:42 +00:00
RazeSoldier
f54e78b901 Installer: Fix mismatched i18n key names
In DatabaseInstaller::stepApplySourceFile(), the output format
of the error message is `config-$stepName-tables-exist` and
`config-$stepName-tables-failed`. Fix `config-install-tables-manual-exist`
and `config-install-tables-manual-failed` to `config-install-manual-tables-exist`
and `config-install-manual-tables-failed`

Bug: T257765
Change-Id: Iabd71b897aa373becc8b2813dde07847b04ad230
2020-07-24 01:04:36 +08:00
daniel
cd6d423eef Import: use master DB for loading slots.
We were using the master to load revision data from the revision
table, but not when loading slot data. We should use the master DB for
both, consistently.

Bug: T258666
Change-Id: I800adb852ec690b63fa926f40428de3272d69584
2020-07-23 18:34:34 +02:00
Thiemo Kreuz
fd7363a1e1 Fix broken PHPDoc comments that don't start with /**
Change-Id: I8db56ff0f73873864dde260e51adcd729aa74e94
2020-07-23 16:09:41 +00:00
Cindy Cicalese
f3556c729e Remove backward compatibility code from ImportableOldRevisionImporter
The last constructor parameter is now mandatory.

Depends-on: Ifd5dbc2b947533a5e926c581e1c5a67e4af147dc
Bug: T220525
Change-Id: I47071440a9696f18568e542fe6eee32843c28210
2020-07-23 12:25:56 +00:00
Translation updater bot
c2aa38f46b Localisation updates from https://translatewiki.net.
Change-Id: I61f774068939a49985aa4469f4dcae9403c8af03
2020-07-23 08:26:51 +02:00
jenkins-bot
f80018225f Merge "Cleanup up excess commit() call in LocalRepoTest" 2020-07-23 03:19:08 +00:00
Aaron Schulz
dc388e6c16 Cleanup up excess commit() call in LocalRepoTest
Bug: T256394
Change-Id: I4bdfa6f0034e36c88c337319df2b2fbacded147b
2020-07-22 16:22:01 -07:00
Kunal Mehta
0b43c49465 Revert "Add a new type of database to the installer from extension"
It caused a 20% latency regression by unconditionally parsing extension.json
files on every single load instead of using the existing caching
infrastructure. There are further problems with the use of parsing/loading
extension.json files in a method that is incompatible with the existing
architecture.

This primarily reverts commit 46eabe275c.

Also needed to revert 16381261ae and 7c72347ec1.

Bug: T258664
Change-Id: I34a783c3f0df0447876a26441bb2d12e02368871
2020-07-22 16:05:31 -07:00
jenkins-bot
d7a9cb7db3 Merge "Fix js error on edit page when user is not logged in" 2020-07-22 22:35:20 +00:00
jenkins-bot
a11df366b2 Merge "Fix scopedRegister() handler key" 2020-07-22 19:55:22 +00:00
Nikki Nikkhoui
7defcf9c15 Fix scopedRegister() handler key
Use a unique key to assign handlers registered via
scopedRegister(). Using unique keys instead of
array indices ensures that handlers registered in other
ways previously (e.g. via global hook registry or via
HookContainer::register() won't be removed).

Remove the temporary hook for AlternateUserMailer
as the ticket it references is for a class that
no longer exists

Bug: T255056
Change-Id: I491f281e60511a5bdd695ac123611e408324ccff
2020-07-22 12:24:22 -07:00
jenkins-bot
777d339967 Merge "Create fallback for undefined content models." 2020-07-22 18:54:23 +00:00
jenkins-bot
e2c07404df Merge "UserContributionsHandler: use UserFactory::newAnonymous" 2020-07-22 18:51:16 +00:00
daniel
a67cad6d0f Create fallback for undefined content models.
This causes RevisionStore to use FallbackContent instances to represent
content for which no content handler is defined.

This may happen when loading revisions using a model that was defined
by an extension that has since been uninstalled.

Bug: T220594
Bug: T220793
Bug: T228921
Change-Id: I5cc9e61223ab22406091479617b077512aa6ae2d
2020-07-22 19:59:09 +02:00
daniel
4f5e7c4bfa UserContributionsHandler: use UserFactory::newAnonymous
Change-Id: Ic7d402903b63a5fba6dabd3569d9d6ee18d11b3a
2020-07-22 18:33:16 +02:00
Nikki Nikkhoui
43f2d5440f Rename 'revisions' to 'contributions'
Extensions have the ability to inject their own idea of what
a contribution is into the ContribsPager query resultset (via
the ContribsPager__reallyDoQueryHook). Because of this,
stable chronological ordering of ContribsPager results
becomes virtually impossible

For the purpose of the User Contribution REST endpoints, we will
restrict the resultset to ONLY mediawiki revisions for now.

This patch renames 'revisions' to 'contributions' and adds the
'type' field to future-proof work on adding different kinds of
contributions to the User Contribution REST endpoints.

Bug: T257838
Change-Id: I1e6de1c14a5f47e0310df86325fa6d791833addb
2020-07-22 18:29:29 +02:00
jenkins-bot
0b76ba5bb5 Merge "Add option to not call onContribsPager__reallyDoQuery hook" 2020-07-22 16:24:47 +00:00
Nikki Nikkhoui
268400fbde Add option to not call onContribsPager__reallyDoQuery hook
For some use cases (e.g. UserContributions endpoints (T235073) )
we do not want extensions to be able to inject their own
contributions into the result set of ContribsPager.

This is because extensions may not be adding revisions, but
other types of 'contributions'. With the hook enabled,
we are unable to reliably enforce strict chronological
ordering of contributions. (See T200259 for explanation).

Disabling the hook provides a consistent set of revisions for the
User Contribution endpoints.

Bug: T257839
Change-Id: I239395c572d4cb32a4d9ee871ffa02accfdce837
2020-07-22 18:00:51 +02:00
jenkins-bot
a500e72fe2 Merge "Remove Italian as fallback for Maltese" 2020-07-22 15:51:06 +00:00
jenkins-bot
f32034c212 Merge "Add CentralIdLookup::factoryNonLocal()" 2020-07-22 13:55:36 +00:00
Jon Harald Søby
d2b074263b Remove Italian as fallback for Maltese
Bug: T257589
Change-Id: Iea50574ed7129628f4e846651b1110ce09492c5d
2020-07-22 12:42:09 +00:00
Translation updater bot
8a16a35bd1 Localisation updates from https://translatewiki.net.
Change-Id: Ib7f360fdd6ed83c3b0b643a09af3592e2d776091
2020-07-22 08:25:11 +02:00
jenkins-bot
df0c5f96ee Merge "OOUI: Backport I3d88853fdf9915d2b08063c80ecaf7d92828a5df" 2020-07-21 23:53:38 +00:00
Dayllan Maza
5b97467e2c Fix js error on edit page when user is not logged in
* OO.ui.infuse is now called only if the dom element exists
* mediawiki.action.edit.watchlistExpiry module is only added if
  watchlistExpiry is enabled and the user is logged in

Follow-up: Ice5113a97b1ef97253bfa
Bug: T258443
Change-Id: Ie1f2f9efa44ce1d723e2510170d457ead8b0fbbb
2020-07-21 16:48:02 -04:00
Lucas Werkmeister
b0d7337ef4 Add CentralIdLookup::factoryNonLocal()
This is basically a workaround for T163277 and T170996: it’s hard to
tell whether the IDs returned by a CentralIdLookup are actually safe to
use cross-wiki or not, so add a factory method which only returns a
CentralIdLookup that can be expected to provide cross-wiki IDs, and
otherwise gives up and returns null.

This is a port of the Wikibase CentralIdLookupFactory class, originally
added in change Ie7b9c482cf by Matthew Flaschen.

Bug: T258390
Change-Id: I903c126be413608bd366875ecc7ac007d4da8e3f
2020-07-21 17:48:19 +02:00
jenkins-bot
28ff8803a0 Merge "Bump Parsoid to 0.13.0 for MediaWiki 1.36" 2020-07-21 13:43:53 +00:00
Amir Sarabadani
5fb5dab231 Drop html5shiv
According to T248061 the basic support for IE8 is gone now meaning we
don't need to serve the snippet for html5shiv anymore.

Also dropping the html5shiv code.

Bug: T248061
Change-Id: I1a8dbd72ae68f518f52a76a80a3b54239720d20c
2020-07-21 11:11:08 +00:00
jenkins-bot
001a9a6985 Merge "PageUpdater: fix handling of null edits" 2020-07-21 10:48:35 +00:00
Ostrzyciel
8de0f3a883 PageUpdater: fix handling of null edits
Previously null edits were not properly marked in EditResult objects
provided by the PageUpdater. This change should fix it, by ensuring
the original revision ID is always set on the EditResultBuilder if
the edit is a null edit.

I've also added some code to test this, so we hopefully don't
encounter an issue like this in the future. :)

Bug: T257766
Change-Id: I04bb058c64483967617958d86aa40a67c31071cb
2020-07-21 12:22:33 +02:00
jenkins-bot
7f612a2824 Merge "registration: Sync v2 and v1 schemas" 2020-07-21 09:45:05 +00:00
Translation updater bot
7fc1db3e76 Localisation updates from https://translatewiki.net.
Change-Id: I15e0bbb562ae3cea7474e48499a6d8490ce3cefa
2020-07-21 09:09:44 +02:00
Kunal Mehta
46d4504660 registration: Sync v2 and v1 schemas
Unless it's an intentional deviation, everything in v2 should also be in v1.

This copies over:
* e71e025aba: Add 'ParsoidModules' ...
* 7abd828ea3: Extension schema updates for HookContainer
* 34bff221ba: Introduce 'MessagePosterModule' extension attribute
* e97f2943f2: QUnitTestModule should support packageFiles and templates
** d50c7f5b56: Fix schemas for 'packageFiles'
** ee1f4f8ea3: Fix schemas for 'templates'
* 3f0056a252: REST API initial commit

Change-Id: I1ae6fed0261ad29ea5cb39b3511b8cde392ab612
2020-07-20 16:31:45 -07:00
C. Scott Ananian
90307bd2e3 Bump Parsoid to 0.13.0 for MediaWiki 1.36
Parsoid 0.12.x releases will be for MediaWiki 1.35.x and we've started
a new minor version for MediaWiki 1.36.

Depends-On: I13ff232f4ecfb1d072cbeda6d00eedffa65d3bd2
Change-Id: Ife86fed25de108cf4e401f9b2ec6d64190ec3411
2020-07-20 17:20:11 -04:00
jenkins-bot
3a1faac376 Merge "Remove keyup event from checkbox hack." 2020-07-20 20:21:56 +00:00
jenkins-bot
f60232cef5 Merge "Remove unused HookContainerTest method" 2020-07-20 20:12:43 +00:00
Bartosz Dziewoński
31e6f22652 OOUI: Backport I3d88853fdf9915d2b08063c80ecaf7d92828a5df
Bug: T258256
Change-Id: I77a195d2b786ede76359675817f5a1133ffd4c86
2020-07-20 22:02:55 +02:00
jenkins-bot
6a4a92663b Merge "rdbms: improve Database::commit() "out of sync" logging" 2020-07-20 19:58:53 +00:00
Nikki Nikkhoui
ccc073854c Remove unused HookContainerTest method
Remove an unused private method from HookContainerTest.

Change-Id: Ie158cef343b31209d3d6e2da57176c9049613b19
2020-07-20 09:43:59 -07:00
jenkins-bot
6e971eb257 Merge "Check for unknown slot." 2020-07-20 15:20:13 +00:00