A line in the title blacklist can contains pipe as part of a regex,
the pipe is also used in wikitext, so it needs escaping to allow use of
templates in system message.
Bug: T350296
Change-Id: I7f18bb7111b989cc66808f17476bacdf45120e09
titleblacklist is not part of action=query (since a2f5ccd2 back in 2011)
and should not follow that naming schema.
No class alias as nobody needs to call the class directly
Change-Id: If57e5bd9291a894edf42835fed07d37cd8e8abed
When the custom error message contains {{PAGENAME}} or other title based
variables, there are currently parsed as
"Badtitle/dummy_title_for_API_calls_set_in_api.php"
The same custom message is shown correctly on index.php
Bug: T340923
Change-Id: I4c1dc6660976de54ff6ba8f8f7a5768371e61e80
E.g. reducing deep indention and code duplication. Removing comments
that literally repeat what the code says.
The goal is to make the code easier to read and to maintain in the
future. I hope this is the case.
Change-Id: I6f23bc61ffb8b6d42ec697fec91bb6c92152561f
TitleBlacklist compares cache version in app code, meaning that entries
with old versions will still be deserialized.
Bug: T307513
Change-Id: Icea6022fcf5530b2429ce660e2589dd5954577a7
WikiPage::factory() is deprecated since 1.36 and should be replaced
with WikiPageFactory::newFromTitle().
Bug: T297688
Change-Id: Ic3f8745de45916baca68ab3620ca88148fbbc4ba
ContentHandler::getContentText() is deprecated and should be
replaced with Content::getText() for TextContent instances.
Change-Id: If38508a069c668e43686226262acbb8ecce92764
Useful for logging
Replace deprecated Http::get with service (since 1.34)
Have to check for falsy to avoid returning non-string
Change-Id: I6d06698cf1e34d0cb9ab7d808145b80b556cd243
The $messageMemc legacy global, is a BagOStuff intended for
MessageCache service, configured by wgMessageCacheType.
Use that directly as a short-term measure so that we can remove
$messageMemc initialization from Setup.php.
Bug: T189966
Bug: T243175
Change-Id: I04a0e578d76269fa02ee85cffee070dc3e1f4512
Change I5d79426a32 (commit f03d6c617b) changed what kinds of values we
store in the cache – Status objects, rather than plain arrays. This
means we need to use a different cache key as well, or they’ll get all
mixed up.
Note that this will effectively replace the current “warm” cache with a
“cold” one on deployment.
Bug: T246643
Change-Id: I0dc5b796af4ab574cd31c8e01d24ddae3edc8a4c
Migrate from AntiSpoof::checkUnicodeString to the new function with
status object - was added in 1.32
Use ExtensionRegistry to check for extension
Add error message from the Status to the log
Change-Id: I5d79426a328c6ddc02789d795bc84599e8e5c06d
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingReturn
Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
Change-Id: I668c40626bbb60ff8c1ddc130ffdf95c6eefbd2e
Replacement with services made available in 1.28 and this extension
requires 1.31. So, the replacement is good.
Change-Id: Ia1452ace85d13eb07f7d55b338e120f24d339069
Also, cleanup various legacy behavior of hooks: as they return true. In
addition, objects are passed by reference by default.
I see more room for improvements, but will keep doing them in later change
sets.
Change-Id: I1ff3ec493a1d161cfbcfacf49b1af486a93b1052