BlockPermissionChecker uses AbstractBlock::parseTarget
to parse the target (if not done already), and we should
accept the same types to avoid confusion.
Change-Id: Idc96ae55c565eddc7cd1a3ea7305db0ea405f9bb
User::findUsersByGroup has a hard limit of 5000 users, so put it
in a loop. While we are there, replace a deprecated method, handle
failures and make the output a bit more pretty.
Change-Id: I5cc93f17a70dfcdc6ed5f1b57e11ebfd7bf9d76c
When the "local server cache" falls back to EmptyBagOStuff in CLI mode,
this may cause performance degradation in DB related code. This ensures
we have at least in-process caching in place.
Bug: T254430
Change-Id: I08061e3033a3da2f6f618969c080d31da0c6af79
The ArchivedFile::userCan and OldLocalFile::userCan() methods, along
with a number of other methods where the user parameter was optional,
were deprecated in 1.35, but this case was overlooked. This patch is
intended for backport to 1.35, so that the $user parameter can be
removed in 1.36 in accordance with the deprecation policy.
This path is known to be used by LocalRepo::findFile(),
FileRepo::findFile(), and FileRepo::findFileFromKey(), so hacky
workarounds have been added in this patch to avoid triggering
deprecation warnings in 1.35. T263033 has been filed to fix these
'correctly' in 1.36.
Bug: T263014
Change-Id: I17cab8ce043a5965aeab089392068b91c686025e
Import lets you to attribute revisions to other users
(especially importupload), which makes it more sensitive
than purely mass editing.
Change-Id: If79e0e570fecf724ace23c1ba4de364043961258
rebuildLocalisationCache.php can fail when clearing the MessageBlobStore
due to a hook while constructing a ResourceLoader. This problem was also
encountered in T231866, but the fix was only applied to
ServiceWiring.php and not this duplicated code in
rebuildLocalisationCache.php.
So, fix rebuildLocalisationCache.php to similarly not construct a
ResourceLoader object.
Bug: T262900
Change-Id: I4e28c0f4e06efd219226154ab955395e00be504f
This is a follow up to I9aba8cccc2ef75c59b78008723d0ae76d853c5f2
to add the 'mw-' prefix to the CSS class added there.
The whole of special.less has the stylelint selector-class-pattern
rule being excluded, so this wasn't picked up when it was first
added. For this reason, the disabling is moved to next-line form
and copied to all the remaining incorrect selectors (to avoid
this problem in the future).
Change-Id: Idfaec3ff3aa0e3ecc5217aa4a557a67378991757
This is a second take at moving the mw.notify area to be outside
the main $content element. It moves .mw-notification-area to be
at the end of the body, and adjusts its top offset to match that
of $content or (if a skin has provided its own area) the area.
This introduces a breaking change for skins that don't set their
own area and which assume that the starting offset of the area
matches that of $content. We've talked about this and it feels
more correct to do it this way and then have skins correct their
own display where required (Timeless for example already adds
an offset; we'll make patches for other skins as required).
Bug: T260413
Bug: T260262
Bug: T260432
Change-Id: I12db7c1745d17851f6421123a145de4cb916ad51
The {{formatnum}} parser function can take anything, not just numeric
strings. We'd like to restrict Language::commafy() to operate only on
numeric strings, however (see T237467). Split the argument to the
{{formatnum}} parser function so that we only invoke
Language::commafy() on numeric strings. Add a tracking category so we
can (gradually) lint our content appropriately.
Bug: T237467
Change-Id: Ib6c832df1f69aa4579402701fad1f77e548291ee
We plan to add {{=}} as a built-in parser function, expanding to `=`,
in the same way that `{{!}}` is a built-in. It will be used to
automatically escape uses of `=` in template arguments (again, in the
same way that `{{!}}` can be used to protect uses of `|` in template
arguments).
Some wikis have non-standard definitions of `Template:=`; add a
tracking category to warn these wikis to transition before we turn on
the built-in parser function in a future release.
New parser test file added, so we can re-define Template:= and test
both cases of this new warning.
Bug: T91154
Change-Id: I50ff8a7b6be95901ebb14ffbe64940a0f499cfac
It leads to surprising results when the definitions in one parser test
file leak into all the others. This can cause spurious test failures
when you happen to have two extensions which define conflicting
article fixtures, and prevents you from using parser tests to test
patches like I50ff8a7b6be95901ebb14ffbe64940a0f499cfac, where you
deliberately want to set up and test two different definitions for the
same template name.
Change-Id: I958c6305a95ca32418d83b7f33f7c180a3b370cd
Not working on Special:AbuseFilter for example
Skins can disable this module so special pages must
add it explicitly.
Bug: T260642
Change-Id: I51deedf9c60279b0917ab085fd7498edf55e93da