Commit graph

976 commits

Author SHA1 Message Date
jenkins-bot
dfe30d5118 Merge "Refactor buildPrevNextNavigation" 2019-06-06 09:04:26 +00:00
clarakosi
4ca72763ec Refactor buildPrevNextNavigation
Refactored buildPrevNextNavigation() into standalone helper class,
PrevNextNavigationRenderer, to be used by both SpecialPages and Pagers.

Bug:T207977
Change-Id: Ic49837a451f795ec203e867961ec1c69075cc91a
2019-06-05 19:32:27 -04:00
jenkins-bot
e3705c7b17 Merge "Add action=query&meta=languageinfo API module" 2019-06-04 20:03:38 +00:00
Lucas Werkmeister
67b3cdc004 Add action=query&meta=languageinfo API module
This API module can be used to get information about all the languages
supported by this MediaWiki installation. Since parts of this
information, such as the fallback chain, are expensive to retrieve if
the localization cache is not populated, we apply continuation if the
request is taking too long (suggested by Anomie in T217239#4994301); we
don’t expect this to happen in Wikimedia production, though.

Bug: T74153
Bug: T220415
Change-Id: Ic66991cd85ed4439a47bfb1412dbe24c23bd9819
2019-06-03 12:46:03 +02:00
jenkins-bot
e5ef0fd0c6 Merge "Add checkDependencies.php" 2019-05-29 19:36:04 +00:00
Thalia
e65a5b5882 Rename Block to MediaWiki\Block\DatabaseBlock
Keep Block as a deprecated class alias for DatabaseBlock.
Update calls to the Block constructor and Block static
methods from external classes.

Also update documentation in several places that refer to
blocks as Blocks.

Bug: T222737
Change-Id: I6d96b63ca0a84bee19486471e0a16a53a79d768a
2019-05-28 12:20:48 +01:00
jenkins-bot
cc74170831 Merge "Introduce TransactionRoundAwareUpdate interface" 2019-05-25 21:37:35 +00:00
Aaron Schulz
ef949d79d2 Introduce TransactionRoundAwareUpdate interface
Refactor the deferred update transaction round handling code to use
a new TransactionRoundAwareUpdate interface. Also, rename a few
DeferredUpdates methods so they do not give the impression that
doUpdates() is always called.

Change-Id: Idc4c6d81c4e2ca0ce41bca1e7800f797fa7e37f6
2019-05-25 02:33:05 +00:00
Kunal Mehta
c20215d6f0 Add checkDependencies.php
Checks to see whether the specified MediaWiki extensions/skins have all of
their dependencies. Each thing will get a status of:

* 'loaded' (it's already activated in LocalSettings.php, and therefore all
  the dependencies are present)
* 'present' (it exists in the filesystem, but not yet activated)
* 'missing' (does not exist in the filesystem)
* 'incompatible-*' (some version requirement is incompatible)

JSON output is available with --json for use in scripts.

Development dependencies will be checked if --dev is provided.

This is roughly based on the logic already existing in the Installer. It may
be worth deduplicating that code in the future.

Bug: T193824
Change-Id: Iae9178225c10b6374484274d8848bbea6621c8c2
2019-05-24 11:56:03 -07:00
jenkins-bot
60fbf0d875 Merge "rdbms: improve query logging logic in Database" 2019-05-21 22:12:32 +00:00
Reedy
489370cf07 Remove FileRepoStatus
Change-Id: I4712d7cf8177dd3a7b8157d980dacb88a902262c
2019-05-14 16:55:59 +01:00
Ariel T. Glenn
ee66a53468 move 7zip.inc to a regular php file
Bug: T182814
Change-Id: I53746333fe3c1cdc357bf46d71a351231a845e2f
2019-05-13 11:25:24 +00:00
Ariel T. Glenn
bb880f74b1 move most of dumpTextPass to an include file so it can be subclassed
Bug: T164262
Change-Id: I9b3c54503dd9ad193af7765459613a7e73ffbb45
2019-05-13 10:14:09 +03:00
Aaron Schulz
e0cc49ce39 rdbms: improve query logging logic in Database
* Merge the two debug() calls in attemptQuery() into one single
  call which checks DBO_DEBUG. This avoids pointless SPI logger
  overhead.
* Avoid calling generalizeSQL() unless actually necessary. This
  works via a lazy-loading object.
* Make lastQuery() a bit more consistent in terms of when it
  gets updated.
* Add DBQueryDisconnectedError class for dropped connections.
* Clean up visbility and names of last query/error fields.

Change-Id: Ie8df3434d23b18f7a0f4c056d71388192cc52c6b
2019-05-08 14:58:10 -07:00
Aaron Schulz
920bb76c6d rdbms: remove unused SavepointPostgres class
Change-Id: I45117c10d7f4ab779e95536807dad055c2970117
2019-05-08 21:33:23 +00:00
jenkins-bot
27ede06954 Merge "Move ApiQueryUserInfo::getBlockInfo() to ApiBase" 2019-05-06 12:29:40 +00:00
Amir Sarabadani
693c8b2f5a Move ApiQueryUserInfo::getBlockInfo() to ApiBase
ApiBase directly uses this method causing a cyclic dependency between
ApiBase and ApiQueryUserInfo

Change-Id: I84ed21641c44b2f65ebe1980b0893d1846db3b34
2019-05-06 00:06:30 +02:00
Aaron Schulz
4d8bfbdca4 Add UserOptionsUpdateJob class
This can help avoid DB master queries on HTTP GET requests

Change-Id: I6fa2d53d96509d88f5d3e1ff18f3ca1de8fa4bb1
2019-05-03 12:02:20 -07:00
jenkins-bot
31e768e643 Merge "Make generatePhpCharToUpperMappings.php a proper maintenance script" 2019-05-02 19:34:21 +00:00
Ed Sanders
5b3106f12b Make generatePhpCharToUpperMappings.php a proper maintenance script
This allows us to use Title for converting to upper case which
will respect any compatibility fixes added later.

Bug: T219279
Change-Id: I746487df12e4628f1e37b33b7cc3cce597853596
2019-05-02 10:47:26 -07:00
Aryeh Gregor
18ec468633 Don't pass Config to service constructors
We don't want to depend on the entire site configuration when we only
need a few specific settings.

This change additionally means that these services no longer see a live
version of the settings, but rather a copy. This means in tests you
really do have to call overrideMwServices() if you want services to pick
up your config changes.

ResourceLoader and SearchEngineConfig will need more work to port,
because they expose their member Config in a getter, and the getter is
actually used.

Parser and NamespaceInfo are also relatively complicated, so I split
them into separate patches.

Tested with 100% code coverage. \o/

Depends-On: If6534b18f6657ec1aba7327463f2661037f995b3
Change-Id: I1a3f358e8659b49de4502dc8216ecb6f35f4e02a
2019-05-02 11:33:56 +03:00
Zoranzoki21
4226fada45 Split parser related files to have one class in one file
Change-Id: I36b26609ccb3f135a22961b32a46cdc06603b3e4
2019-04-27 00:41:47 +00:00
Zoranzoki21
2d4eacf50b Split ApiErrorFormatter.php to have one class in one file
Change-Id: I5c6904e32f9bc7fe3aac511c56b03757bfde15a9
2019-04-21 22:20:22 +00:00
Giuseppe Lavagetto
d46835ef4f Add ability to override mb_strtoupper in Language::ucfirst
Different PHP versions treat unicode differently, and specifically some
wiki resources become unreachable if mb_strtoupper's behavior has changed.
This patch allows to introduce an override table that allows to smooth
the transition period.

It also provides maintenance scripts to generate such an override table.

Bug: T219279
Change-Id: I0503ff4207fded4648c58c7b50e67c55422a4849
2019-04-17 15:18:44 +00:00
Aaron Schulz
950c1c3246 filebackend: move more files to subdirectories
Change-Id: If965323809c5bfc9cb73ed0f357233d9325d3353
2019-04-15 02:30:24 -07:00
Reedy
40552888fc Split DairikiDiff to class per file
Change-Id: Ica426312ec69707b9a99dfe2a7deee945c38ba35
2019-04-14 23:37:52 +01:00
jenkins-bot
6955a4afc3 Merge "Split filebackend files to class per file" 2019-04-14 22:24:56 +00:00
Reedy
79502d48e6 Rename PhpBugTests -> PhpXMLBugTester
Only contains one class (probably should be removed when we bump to PHP 7 fully)

Change-Id: Iab2bb837e2ed5d5556bd49f4236030b43aba29f1
2019-04-14 22:03:47 +00:00
Reedy
7f04a47d68 Split filebackend files to class per file
Change-Id: Idf9f4177fb9a523ce41227bda2af923bf418396b
2019-04-14 23:02:13 +01:00
jenkins-bot
63e017f4fc Merge "Split HTMLFormElement.php into class per file" 2019-04-14 21:59:45 +00:00
jenkins-bot
2ba7a9f28d Merge "Move ClassCollector to its own file" 2019-04-14 21:54:10 +00:00
jenkins-bot
81c888ab85 Merge "Move SectionProfileCallback to its own file" 2019-04-14 21:53:00 +00:00
jenkins-bot
89b0d88c38 Merge "Remove XMPReader back compat" 2019-04-14 21:25:47 +00:00
Reedy
14826d1e0c Move ClassCollector to its own file
Change-Id: I881f1ccc4aaf8babc40ad534a2a91f1ccf3baad4
2019-04-14 19:46:18 +00:00
Reedy
6341ee8fa6 Move SectionProfileCallback to its own file
Change-Id: Iccb2048eed6631caa4f20639f55866e76f9fabf0
2019-04-14 19:25:56 +00:00
jenkins-bot
492215443d Merge "Fix casing of Special Pages to match class name" 2019-04-14 19:25:29 +00:00
jenkins-bot
cea4096dd7 Merge "Remove HWLDFWordAccumulator, deprecated in 1.28" 2019-04-14 19:21:26 +00:00
jenkins-bot
535dd60c71 Merge "Remove ObjectFactory" 2019-04-14 19:21:21 +00:00
Reedy
95b8b3a4de Remove XMPReader back compat
Change-Id: I4e3ecbf6c13a7e7cfed88253eb6820e78e49e9c3
2019-04-14 19:12:54 +00:00
Zoranzoki21
e996b53913 Split StubObject.php to have one class in one file
Change-Id: If00625b700962a1c6d6412c6de30c28fa3df9f81
2019-04-14 14:20:42 +00:00
Reedy
ae031e237e Remove HWLDFWordAccumulator, deprecated in 1.28
Change-Id: I1eb6ba3c4b8b4cbabf26033a27728e42ebcddb23
2019-04-14 14:52:41 +01:00
Reedy
dad735ed09 Remove ObjectFactory
Change-Id: Ibfdb55101c893a6724e1f999eba85f2f8eabb79b
2019-04-14 14:48:08 +01:00
Reedy
c28707d371 Fix casing of Special Pages to match class name
Change-Id: Ifc9e827202493e8f055a21875c54ff827a38d1f7
2019-04-14 13:55:04 +01:00
Reedy
a32b1b16ef Split HTMLFormElement.php into class per file
Change-Id: Ia8a35056fa6df5b81cda3e5bfcaac91d0b898d51
2019-04-14 13:38:49 +01:00
Umherirrender
b8ec4a8ff8 Split LocalFile.php to have one class in one file
Change-Id: Ic8e5220f2a1832dfc39f00720001235429ed2cab
2019-04-14 11:45:39 +02:00
Reedy
d1a3d98be9 Move UploadStashFile to its own file
Change-Id: I557bcd8369014bf2ea43c5eb8336562cb6295890
2019-04-14 03:50:59 +01:00
jenkins-bot
2a710e256f Merge "Split logging classes to individual files" 2019-04-14 02:26:45 +00:00
Reedy
f032d27d0c Split logging classes to individual files
Change-Id: I3eaaf23612fe1aed65e49c06a9e5e565399af9ce
2019-04-14 02:13:47 +00:00
Reedy
d8f480bad3 Remove PreferencesFormLegacy.php
Now unused, deprecated in 1.32

Change-Id: I4fc4bdf36b3832786c0266786cff57d512140d8e
2019-04-14 02:08:32 +00:00
Reedy
4be4fdc9cf Split SVGReader to its own file
Change-Id: I9fc442225a37c14d0606508aed5ef496a5ad82ba
2019-04-14 00:29:52 +00:00