Commit graph

95923 commits

Author SHA1 Message Date
Timo Tijhof
3a69f9bb29 HTMLCacheUpdateJob: Enable PURGE_URLS_LINKSUPDATE_ONLY to reduce purges
* Pass $flags down from purgeTitleUrls() to getUrls().

* Avoid purging of action=history URLs (and its mobile variant,
  if MobileFrontend is installed) when the purge is only for a
  recursive LinksUpdate.

Bug: T250261
Change-Id: I1a05ae028b9b44ec8d66211f94e64c7e3f48d6ff
2020-04-30 18:26:41 +00:00
Timo Tijhof
2f35c3ae67 HtmlCacheUpdater: Add getUrls() method and support selective purging
* Move the Title::getCdnUrls() logic to the new HtmlCacheUpdater service.

* Introduce a runtime option to decide whether this is for a direct
  revision or a cascading LinksUpdate.

Bug: T250261
Change-Id: I514b9052761e0d949234996e97fdef255582df86
2020-04-30 18:16:07 +00:00
Reedy
5938842a97 registration: Alphasort internal arrays in ExtensionProcessor
Change-Id: I6ee7e5b3a62d6e09775c3d817f1dad83e1371f33
2020-04-30 17:53:33 +00:00
DannyS712
28cb11e8ca Replace uses and hard deprecate Revision::getSha1
Bug: T251233
Change-Id: I815db5120094909b2820b8ca56d65a62f6af82d1
2020-04-30 17:44:11 +00:00
DannyS712
fd9c48d38e Have CoreParserFunctions::getCachedRevisionObject return RevisionRecord
Private method, no need to worry about deprecation

Most of its uses in the class called Revision methods that were
identical to the RevisionRecord methods, and didn't need to change
to reflect the new type being returned.

Remove a use of Revision::getUserText

Bug: T249393
Bug: T250579
Change-Id: Ide0dcd01caee3d3388038e6f40edda25528f55d8
2020-04-30 17:44:03 +00:00
jenkins-bot
7dcbfaa3a4 Merge "tests: Simplify ButtonAuthenticationRequestTest" 2020-04-30 17:26:56 +00:00
jenkins-bot
8ac01a5237 Merge "UploadedFileStream: PHP 8 compatibility" 2020-04-30 17:25:40 +00:00
daniel
7bf7022c54 LinksUpdate: report title when no page ID found
Bug: T250551
Change-Id: I97fac4cb4094195d79ad1569d73a77e5805573f3
2020-04-30 19:24:39 +02:00
jenkins-bot
06a595c377 Merge "Follow-up I07dd6f78: Use correct font on live preview of changes" 2020-04-30 17:23:49 +00:00
jenkins-bot
f58e17a9d1 Merge "mediawiki.util: Simplify $content init() and add tests" 2020-04-30 17:15:11 +00:00
Max Semenik
9540494ae7 tests: Simplify ButtonAuthenticationRequestTest
Mocking is not needed here and furthermore it failed on PHP 8
due to the way PHPUnit works with it.

Bug: T248925
Change-Id: Ia6edd8fb714f36255f4ed7ebf58fc663520b4602
2020-04-30 17:12:05 +00:00
Max Semenik
79ca26279c UploadedFileStream: PHP 8 compatibility
In 8, some I/O functions now throw, adapt to this.

Bug: T248925
Change-Id: Ic167ae0e903f143a8d423dc185383437e4c0afd2
2020-04-30 17:09:23 +00:00
Ed Sanders
b82369b4eb Follow-up I07dd6f78: Use correct font on live preview of changes
Bug: T250393
Change-Id: I1fdef4e14660a181e0732d6fef343a090817afde
2020-04-30 16:43:10 +01:00
jenkins-bot
494a189f48 Merge "tests: Make static/non-static functions match" 2020-04-30 14:18:18 +00:00
jenkins-bot
072493f227 Merge "MediaWikiServices: Add return type hint to getHtmlCacheUpdater()" 2020-04-30 14:18:12 +00:00
Derick A
2c536c025b MediaWikiServices: Add @since annotation to getHookContainer()
Per 0adc5f3, this method was added in MediaWiki 1.35. It's important
to add this indicator for extension developers when requiring certain
MW versions so they don't assume.

Change-Id: Iaebf127be14e0346f6ef7e520102b466a407ce9b
2020-04-30 15:00:28 +01:00
Derick A
5326d4c07b MediaWikiServices: Add return type hint to getHtmlCacheUpdater()
Change-Id: I764552a2490ac0c408e615ca14eb3c5e114ab67c
2020-04-30 14:31:11 +01:00
jenkins-bot
dab27d410b Merge "search: Add 'SearchMappings' attribute to map canonical name to PHP class" 2020-04-30 10:05:31 +00:00
jenkins-bot
420f05f802 Merge "Make populatePPSortKey less noisy" 2020-04-30 08:26:34 +00:00
jenkins-bot
c5b622b207 Merge "Fix typo on resetAuthenticationThrottle.php error message" 2020-04-30 08:06:06 +00:00
jenkins-bot
11dc1bea99 Merge "Add namespace translations for Awadhi (awa)" 2020-04-30 08:06:00 +00:00
TheSandDoctor
705e7e7c21 Hard deprecate $wgParser
$wgParser, originally soft deprecated in 1.32, has been hard deprecated.

Code search in WMF deployed code:
https://codesearch.wmflabs.org/deployed/?q=%5B%24%5DwgParser%5B%5EA-Z%5D&i=nope&files=&repos=

Everything search:
https://codesearch.wmflabs.org/search/?q=%5B%24%5DwgParser%5B%5EA-Z%5D&i=nope&files=&repos=

Bug: T160811
Change-Id: I6830126d4dedab25b6ae6a2fcbfacdf429f71021
2020-04-30 03:41:04 -04:00
Taavi Väänänen
cd3093226e Fix typo on resetAuthenticationThrottle.php error message
Bug: T251484
Change-Id: I6c6306d475907adfdbea9d5d6c595da3e31a22e0
2020-04-30 09:46:59 +03:00
Translation updater bot
89d80bf518 Localisation updates from https://translatewiki.net.
Change-Id: Iaed7e5621edf52b79370522f543de7e3d228717a
2020-04-30 08:35:30 +02:00
Reedy
eeb8cb1342 search: Add 'SearchMappings' attribute to map canonical name to PHP class
This allows indirection between the values in $wgSearchType and
$wgSearchTypeAlternatives where the underlying class name
doesn't match the actual class name that subclasses
SearchEngine.

Bug: T250977
Change-Id: Ib9634128f07d428276e80a6f2f492b850eef17e8
2020-04-30 04:29:17 +00:00
Timo Tijhof
d64584c83f mediawiki.util: Simplify $content init() and add tests
* Use querySelector() which naturally returns the first match only.
  $().first() on the other hand basically does querySelectorAll(),
  then wraps that in a jQuery object, then creates a second jQuery
  object for nodes[0], and also retains the first object indefinitely
  for compat with $().addBack() which potentially leaks memory and
  isn't actually wanted here.

* Inline the defaulting logic with the native '||' operator.

* Add proper test coverage.

* Don't call `$(init)` during the test suite to avoid creating
  weird creating non-sensical global state in mw.util.$content,
  which nothing should rely on..

* Fix one source file (mediawiki.notification), which was loaded under
  test to export its public class but its UI logic was also being run,
  which previously worked by accident, but didn't do anything useful.

Change-Id: I3fbfa256c6b9a5a89c38bca3d545795e1fb4f2a9
2020-04-30 02:07:14 +01:00
jenkins-bot
d506492d26 Merge "xml: Move condition check of var before creating XmlSelect object" 2020-04-30 00:11:30 +00:00
jenkins-bot
c40d940a12 Merge "Revert "Correct capitalization of BeforeParserFetchTemplateAndTitle hook"" 2020-04-29 23:29:31 +00:00
C. Scott Ananian
fec35a9a93 Update wikimedia/remex-html to v2.2.0
This fixes compatibility issues with PHP 7.4.

Bug: T250935
Depends-On: I6bcb443b00295911a12b97830bd67c52c10dc469
Change-Id: I14b42f05781e2ab062e7fc2facea9d064f85e104
2020-04-29 16:09:56 -07:00
jenkins-bot
6b9678d848 Merge "Filter out expired items from Special:Watchlist page" 2020-04-29 22:41:39 +00:00
Tim Starling
df65f09669 Revert "Correct capitalization of BeforeParserFetchTemplateAndTitle hook"
In the new hook system, it is invalid to have two hooks that differ only
in case.

This reverts commit afb5b38e15.

Change-Id: I160ece0a7bc68c748037b383137364b787be86a0
2020-04-30 07:50:24 +10:00
Amir Aharoni
b469bfef1e Add namespace translations for Awadhi (awa)
Submitted by Wikipedia user Ajeetsinghawadhi.

Change-Id: I3a39ba3b45933e216a158cd69ff6dab079d53a43
2020-04-29 22:02:59 +03:00
jenkins-bot
9b245450f0 Merge "Pass a user to ArchivedFile::userCan in UploadBase" 2020-04-29 18:20:38 +00:00
DannyS712
7b08cbf765 ParserOptionsTest: Rename non-global variable $wgUser
Bug: T243708
Change-Id: I135085fff0f1d9b24a69f6d048f3d3d3e97a8470
2020-04-29 17:32:10 +00:00
jenkins-bot
ee6248f9cf Merge "EditPage::showHeader - only warn editing an old revision if it exists" 2020-04-29 15:35:59 +00:00
jenkins-bot
680ebca448 Merge "ChangesList::insertRollback - Force rc_this_oldid to integer before use" 2020-04-29 14:03:11 +00:00
jenkins-bot
f04a8349b4 Merge "database: Introduce IDatabase::ALL_ROWS constant" 2020-04-29 13:20:28 +00:00
jenkins-bot
79f2c9cf40 Merge "Update message for unblocking error to receive target parameter" 2020-04-29 12:48:27 +00:00
DannyS712
c757ec5fd9 EditPage::showHeader - only warn editing an old revision if it exists
Caused by ca8aa4d6b2

Bug: T251404
Change-Id: I772c322cfe9450e1bc444a32753c81f48a1f3210
2020-04-29 12:47:32 +00:00
jenkins-bot
666137b2d2 Merge "Clarify the comment about RawHtmlMessages" 2020-04-29 12:03:59 +00:00
DannyS712
3d4fb45f96 ChangesList::insertRollback - Force rc_this_oldid to integer before use
Same for the other fields that needed to be integers

Follow up to 71b64e46e4

Bug: T251386
Change-Id: Idf4cc7d3cc54a98e46619c0996f8109bc1e88620
2020-04-29 10:56:51 +00:00
jenkins-bot
9486241a5f Merge "Mention added ami and changed ary in RELEASE-NOTES" 2020-04-29 09:56:51 +00:00
Amir Aharoni
e452b743ac Mention added ami and changed ary in RELEASE-NOTES
Bug: T201269
Bug: T237672
Change-Id: If50b52876ae8ef5a55fba754912be7c3f363b9ea
2020-04-29 12:13:04 +03:00
jenkins-bot
693fe91e99 Merge "DatabaseBlock's status variables should return bool" 2020-04-29 09:10:14 +00:00
Thalia
011e58d1b7 Update message for unblocking error to receive target parameter
The message 'ipb_cant_unblock' can receive a user, IP, IP range or
block ID. Before this, the message was translated and documented as
though the parameter would always be an ID.

Change-Id: I2f729ace6e12bb437b4ac8c9c17075af831497b6
2020-04-29 09:29:58 +01:00
Amir Aharoni
98300949c1 Add fallback settings for recently-added Ladin language
Copied the fallback languages from translatewiki configuration.

Change-Id: I7580355365ce6fd92ec9a3b26f455d5a1ffe308b
2020-04-29 11:23:35 +03:00
Peter Ovchyn
954aef7079 database: Introduce IDatabase::ALL_ROWS constant
In order to prevent possible performance or replication issues, empty condition
for 'update' queries shouldn't be allowed. This patch introduces the constant that
should be passed explicitly in update/delete function to update/delete all rows in
the table.

Bug: T243619
Change-Id: I8442363bb85b2a782ee435a91540823d6962c9cd
2020-04-29 11:15:58 +03:00
Max Semenik
09f2feafd6 tests: Make static/non-static functions match
PHP 8 is stricter about this.

Bug: T248925
Change-Id: I0e9c736d0e2a28ce4a1e096a8ec63321d8b41635
2020-04-29 10:59:53 +03:00
RhinosF1
0bdcc942fc Add Ladin (lld) to Names.php
Bug: T251369
Change-Id: I238c50d5f667c1989c37caf11865e4d9546f4135
2020-04-29 07:49:54 +00:00
Translation updater bot
ee165d568d Localisation updates from https://translatewiki.net.
Change-Id: Id891bc962e0f2898728b34d43f9f70aacca0f5e8
2020-04-29 08:34:04 +02:00