Commit graph

98194 commits

Author SHA1 Message Date
DannyS712
db76cf323f Remove hard deprecated WebRequest::getLimitOffset
Bug: T245777
Change-Id: I25c97236bfa7ab0075ca19d5ec7554aa7f4f4cfe
2020-08-21 22:02:45 +00:00
jenkins-bot
fa652813c5 Merge "Add setCaller to BatchRowIterator" 2020-08-21 18:15:48 +00:00
jenkins-bot
eacabe6225 Merge "ApiBlockInfoTrait: Add some extra basic block details" 2020-08-21 17:58:51 +00:00
Reedy
62d8fe2eac Add setCaller to BatchRowIterator
Bug: T260354
Change-Id: Ia1e2dcc75c1350a9a2c6bffccdc8398ce695e3f3
2020-08-21 17:52:56 +00:00
Reedy
2c6c17223a Add setCaller to BatchRowWriter
Bug: T260354
Change-Id: Ib9f2f6ac18c92999d815872d7c0410d3c57cf92e
2020-08-21 17:26:07 +00:00
Thalia
f4d79db449 ApiBlockInfoTrait: Add some extra basic block details
Add whether the block blocks account creation, and whether it applies
to logged in users. These details are helpful for suggesting a
call-to-action for users who are inadvertently affected by an IP block,
since they may be able to bypass an IP block by logging in or creating
account.

Bug: T260932
Change-Id: I230e9849b1785debfcdd77ba4e0c3a68c922fd90
2020-08-21 18:00:20 +01:00
Reedy
b34519d3f2 Add RELEASE-NOTES for changes since 1.35.0-rc.1
Change-Id: I035f693a51599ba1edb64671dfc1dad7c9c50046
(cherry picked from commit b86370cca3c37494c98ec5dde375092db3eaf35f)
2020-08-21 15:31:20 +00:00
jenkins-bot
74a902243c Merge "Add a maintenance script to create bot passwords." 2020-08-21 08:09:32 +00:00
jenkins-bot
d668b509e8 Merge "WatchedItemStore: Cache single WatchedItems with preexisting expiry" 2020-08-21 08:00:44 +00:00
Alex Dean
8c8654cce0 Add a maintenance script to create bot passwords.
This is useful in testing environments where we want to spin up new mediawiki
instances and configure them programatically.

Change-Id: Ice94b67cb8775786a754de51010e78211954b2b0
2020-08-21 07:25:33 +00:00
jenkins-bot
c101873e0f Merge "Hard-deprecate Sanitizer::escapeIdReferenceList()" 2020-08-21 07:13:58 +00:00
jenkins-bot
c904c8396b Merge "Mark CONSTRUCTOR_OPTIONS as internal" 2020-08-21 07:07:23 +00:00
jenkins-bot
e133e81f54 Merge "Sanitizer: use RemexHtml entity table, instead of its own" 2020-08-21 07:04:42 +00:00
Translation updater bot
bc6880332a Localisation updates from https://translatewiki.net.
Change-Id: Ia454ccd4cad1bda78b7962c3469607e91a13654b
2020-08-21 08:39:31 +02:00
MusikAnimal
c75f250cf6 WatchedItemStore: Cache single WatchedItems with preexisting expiry
This commit makes three changes:

1) Re-fetches the expiry before caching WatchedItems in addWatch().
   Sometimes (as with action=rollback) addWatch() is called without an
   expiry, even though one currently exists. So we must query for the
   preexisting expiry to ensure it persists in the process cache,
   otherwise the star in Vector will be full when it should be a
   half-star.
2) Removes caching of WatchedItems within addWatchBatchForUser(). We do
   not want to fix #1 above within addWatchBatchForUser() as this would
   mean we'd need to fetch expiries en masse, when seemingly only a
   single WatchedItem needs the process cache (the page you're viewing).
   Bulk caching was added in Ie4b69c985815a77b70692db0c4dbf52e1a6a018d
   solely for the benefit of a single page (T28292), so it seems safe to
   move the caching to addWatch().
3) Changes User::addWatch() to use WatchedItemStore::addWatch() instead
   of addWatchBatchForUser(). This is to ensure the WatchedItem is
   stored in the process cache for the aforementioned reasons.
   Accordingly the docblock for addWatchBatchForUser() now encourages
   use of addWatch() for a single page/talk page.

Bug: T259379
Change-Id: I3a071f4fbc28fcc96ca7768e31c6810ff7b8e605
2020-08-21 06:29:20 +00:00
Aryeh Gregor
a24e8a06b5 Mark CONSTRUCTOR_OPTIONS as internal
These were never meant to be part of the public interface and should not
ever have been marked with @since. They're only useful for constructing
the respective objects, which no outside users should be doing.

Change-Id: I86e01272d46fc72af32172d8a12b9180971d4613
2020-08-21 00:18:45 -04:00
jenkins-bot
53758b2175 Merge "Add application/font-sfnt to MimeMap for ttf files" 2020-08-21 03:01:04 +00:00
Reedy
ea545aa863 mime: Fix docs of MIME_EXTENSIONS, they're arrays, not space-seperated
Follows-up 7e01e86e09, which changed the code but forgot the doc block.

Change-Id: I9f6e44bbee3517019fd018c6955f997d9294b59d
2020-08-21 02:10:14 +00:00
RhinosF1
ad0b2a243b Add application/font-sfnt to MimeMap for ttf files
Bug: T260031
Change-Id: I23745115a1cc431767a3458ce95a2d15518b8fd7
2020-08-21 00:31:51 +00:00
C. Scott Ananian
e66f8e2393 Sanitizer: use RemexHtml entity table, instead of its own
Reduce code duplication by using the authoritative HTML entity list
from Remex, instead of duplicating the table inside MediaWiki.

This also extends the set of entities accepted in wikitext to nearly
match HTML5.  (HTML5 allows some entities which are not
semicolon-terminated; wiktext insists on the semicolon.)

This patch brings the core parser closer to Parsoid output, as in most
cases Parsoid already accepted the full HTML5 entity list.
(I873a6120e4bd1c69fee9da76d266e24e97a22add is a corresponding patch to
Parsoid to unify its copy of Sanitizer.)

Also deprecate Sanitizer::hackDocType() while we're updating it, since
this method should not be public.

Bug: T94603
Change-Id: Ia08bc261c3644f83109f13df04b692101b4e8ef2
2020-08-21 00:02:44 +00:00
C. Scott Ananian
b8abd8e01e Hard-deprecate Sanitizer::escapeIdReferenceList()
Code search: https://codesearch.wmcloud.org/search/?q=escapeIdReferenceList&i=nope&files=&repos=

Followup-To: Ifce057b0c436eabec310f812394e86ee7123e7c8
Change-Id: I18f2c47ad6b4f6256d1727f24314cc3c5e13f466
2020-08-20 19:59:13 -04:00
jenkins-bot
436230f12b Merge "Add extra blank line between tables in generated schemas" 2020-08-20 12:57:29 +00:00
jenkins-bot
5f3b46a518 Merge "Make newlines in generated schemas more consistent" 2020-08-20 12:55:29 +00:00
Thalia
1c7b878c99 SpecialBlock: Make error more generic if block not inserted/found
If a block cannot be inserted, but no existing block can be found
against the target, display a generic error explaining this, and
asking the user to report the problem. Also log a warning.

Follow up to I1737e3a69748ebaa743e87b185ba1e3b92afec8c, which
assumed the error was caused by the databases being out of sync.
We have since seen other causes.

Bug: T259212
Change-Id: If0ddbc2de3855c3c7e6c9d78875cbc47a81fddc5
2020-08-20 10:43:34 +00:00
Lucas Werkmeister
8b7a192fd3 Add extra blank line between tables in generated schemas
Put a single blank line between a CREATE TABLE and each accompanying
CREATE INDEX, but two blank lines between those statements and the next
CREATE TABLE.

Change-Id: I8ae8a3c808a772a338e968213031d390bf1b31ca
2020-08-20 12:04:57 +02:00
jenkins-bot
b3be08f101 Merge "mediawiki.visibleTimeout: Update the nextVisibleTimeoutId value" 2020-08-20 08:54:51 +00:00
Translation updater bot
fce9658107 Localisation updates from https://translatewiki.net.
Change-Id: I27e5d2b6381f66a2ca65dbdba3bd7cb6e5350010
2020-08-20 08:25:52 +02:00
jenkins-bot
15e4db49be Merge "Hide watchlist expiry label in edit form" 2020-08-20 01:48:47 +00:00
hmonroy
180a3806e6 mediawiki.visibleTimeout: Update the nextVisibleTimeoutId value
Set the nextVisibleTimeoutId value to 1 when it is initialized.
The nextVisibleTimeoutId is assigned to visibleTimeoutId in the set()
method and it should always be a positive integer.

Bug: T258662
Change-Id: Icd83ec2fb6f08c7b68524295cd8b8b47c3bc6d92
2020-08-19 13:55:36 -07:00
jenkins-bot
2cc3d4f0ba Merge "Hard-deprecate global function wfDiff" 2020-08-19 15:13:12 +00:00
Lucas Werkmeister
639bd2178e Make newlines in generated schemas more consistent
Previously, a first str_replace() would add a single newline before any
CREATE (TABLE or INDEX), and then a second one would add another newline
after the $wgDBTableOptions, resulting in a blank line between any two
CREATEs and also a newline at the end of the file – at least for MySQL
schemas. But PostgreSQL and SQLite schemas don’t use $wgDBTableOptions,
so the second str_replace() was a no-op for them, and they got no blank
line between CREATEs nor a newline at the end of the file. Fix this by
making the first str_replace() insert two newlines and appending a final
newline all the time.

Bug: T260779
Change-Id: Idcc4fae76d382b559f21234f8a6f49e537a60f11
2020-08-19 16:54:41 +02:00
jenkins-bot
d39861bdc3 Merge "UserContributions endpoint add tags 'display' property" 2020-08-19 13:47:53 +00:00
jenkins-bot
1de6056710 Merge "Migrate pagelinks table to abstract schema" 2020-08-19 13:06:07 +00:00
Nikki Nikkhoui
c26d64fc18 UserContributions endpoint add tags 'display' property
Add a property to the 'tags' object in the /user/{name}/contributions
REST endpoint named 'display' which shows the display
HTML for the tag which is either defined in i18n .json
files or overriden at MediaWiki:tag-$name

Bug: T259716
Depends-On: I57e2a7253944a3fde3f52f52bbf5fe8473c8a415
Change-Id: Id755adcab8b0115e19df2a6046643ebe97881e28
2020-08-19 06:04:50 -07:00
Amir Sarabadani
31dd3a9ebe Migrate pagelinks table to abstract schema
In order to migrate MySQL and Sqlite to abstract schema changed the
pl_title data type from varchar binary to varbinary. This wouldn't
affect production.

For migrating Postgres:
 - Dropping foreign key on pl_from
 - Changing data type of pl_namespace from SMALLINT to INT and setting
   its default
 - Setting default of empty string for pl_title
 - Completely rewriting indexes to make it synced with MySQL

Bug: T164898
Bug: T230428
Change-Id: I4af8202742a1826e6b3f8ff36cf4f7b612b82690
2020-08-19 13:58:00 +02:00
jenkins-bot
f3a0fcb2d3 Merge "Remove unneeded ApiCSPReport::isWriteMode" 2020-08-19 11:21:45 +00:00
DannyS712
4ba6eb7d60 Remove unneeded ApiCSPReport::isWriteMode
ApiBase::isWriteMode returns false, no need
to override it to return false as well

Change-Id: If823e4de7ae7ebd549b3971d313563240f44b47b
2020-08-19 10:26:56 +00:00
jenkins-bot
afc4522b4c Merge "Remove usages of global function wfDiff()" 2020-08-19 10:26:42 +00:00
C. Scott Ananian
29546bf612 Hard-deprecate global function wfDiff
Code search: https://codesearch.wmcloud.org/search/?q=wfDiff&i=nope&files=&repos=

Bug: T249061
Followup-To: Ib20a9fbcc2b40e21bc9e99c1197991569b149b00
Change-Id: I2232f7964333c825d80d039fe3a77940fa7271ff
2020-08-19 05:57:59 -04:00
Sam Wilson
574fc1ae11 Hide watchlist expiry label in edit form
Add the possibility for fields in the 'checkboxes' area of the
edit form to set the OOUI invisibleLabel property. Also set
this property for the Watchlist Expiry field.

Update the vertical alignment of fields within the 'checkboxes'
area to ensure they all line up in the middle.

Bug: T260759
Change-Id: I60a9851c780ade275af746714ceb1ce702137037
2020-08-19 15:45:05 +08:00
Translation updater bot
a1ca5339e3 Localisation updates from https://translatewiki.net.
Change-Id: I1ccdf228a18855685f7ab2e66aa603900d014ce8
2020-08-19 08:37:12 +02:00
jenkins-bot
f90f5904f0 Merge "Migrate redirect table to abstract schema" 2020-08-18 22:48:53 +00:00
jenkins-bot
c5058ae016 Merge "Use IPset in MWRestrictions::checkIP" 2020-08-18 21:25:54 +00:00
C. Scott Ananian
9ccb93db25 Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit d9a3e14dfcb422e95de7a79f0eb662fd43f9354f

Change-Id: Iecb80aefb82ddedd8121ddbd633f7481c3436f34
2020-08-18 16:52:34 -04:00
jenkins-bot
7ac8640b45 Merge "EditResult: update undo-related docs" 2020-08-18 15:58:21 +00:00
Reedy
29ab4538a3 Use IPset in MWRestrictions::checkIP
Change-Id: Ibf2fed54ea5d8df70225b41c73b9ab290c9a7591
2020-08-18 12:08:13 +01:00
jenkins-bot
54c12a827b Merge "Remove extra indenting from dumpCategoriesAsRdf.php" 2020-08-18 10:55:19 +00:00
Ostrzyciel
a3f9ed68ce EditResult: update undo-related docs
Updated the doc block to reflect the changes made in
I9279230303a01461039ae8a4641d9897ce194f73

Bug: T259014
Change-Id: I6aeec4ba75f1e5ac939ef526171d7268902f1f57
2020-08-18 11:08:50 +02:00
jenkins-bot
40d6377d45 Merge "Remove mentions of mw.htmlform.Checker" 2020-08-18 07:01:48 +00:00
Translation updater bot
7e5efcaa81 Localisation updates from https://translatewiki.net.
Change-Id: Id5b509a073cef51f13a2a8f82c108602b0c82bc5
2020-08-18 08:36:13 +02:00