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
This is useful in testing environments where we want to spin up new mediawiki
instances and configure them programatically.
Change-Id: Ice94b67cb8775786a754de51010e78211954b2b0
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
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
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
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
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
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
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
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
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
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
Updated the doc block to reflect the changes made in
I9279230303a01461039ae8a4641d9897ce194f73
Bug: T259014
Change-Id: I6aeec4ba75f1e5ac939ef526171d7268902f1f57