| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
Change-Id: Id71c00e8f990a090dd638ff8d5ceb636fc759716
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Not having a default was causing nulls to be passed in inappropriate
places, triggering warning on php 8.1. Set a default offset of 0.
Bug: T313663
Change-Id: I5e275e9c4bf9c214d597790f2bfe285e50b7a5f2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Required to prevent warnings about nulls in php 8.1
Bug: T313663
Change-Id: I49cff6fae311f0016964a41a16737983ec6c4760
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Because the str_replaces were done sequentially, it was possible that
the replacement values for the placeholders of the
CustomConvertCommand would insert placeholder values of their own.
Find all placeholders at once on the original value using
preg_replace_callback and make sure each is replaced only once.
Based on a suggestion by User:SacredSum
Bug: T308394
Change-Id: Id672996454445dd200e57cf207c56e3268a3fcc8
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was briefly used in ApiParse output, but never in a released
MW version. We've transitioned VisualEditor to showtoc instead
to better match the underlying ParserOutput flag name, and so
hidetoc can be removed.
Bug: T314000
Depends-On: I823f26652b9770ea577daee32bff05864a7498bb
Change-Id: Icb9a79d4f7f1c2d01a8ac99a2de7d0784901b195
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Ensure that when constructing a plaintext block log message
for a partial block that the namespace is shown. Currently
because makePageLink in plaintext mode uses the page title
and does not include the $html text, which is used in non-
plaintext mode, it means that for namespace blocks the shown
text is "Special:AllPages".
There is no way to link to Special:AllPages with a specified
namespace while in plaintext mode because the namespace query
parameter cannot be included in the wikilink. This means that,
if the page was still linked to, the link would just show all pages.
As such, unless other patches are submitted to allow the namespace
to be specified when linking through a wikilink, the link is
best removed.
The plaintext value of the namespace is used by the CheckUser
extension, which is what the relevant bug reports issues with.
Bug: T268156
Change-Id: Ic05ae1adf92cb806517226d74bf2edc9a89251cd
|
|\ \ \ \ \ \ |
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | | |
Change-Id: I0e2762223aa6b5ef7fb251d86da6ee4de39b62c8
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This moved the logic for applying page bundle data into the getters that
return DOM elements. It also makes the application of version
downgrades implicit.
NOTE: This patch changes the expected value of one of the phpunit tests
to a version that has no closing </div> tags. This appears to be the
original and expected behavior, per the corresponding test in the
parsoid extension's Parsoid.js test suite.
Change-Id: If2d7b06d8ba92fb63e6955ec7587ed4aea557251
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
effects"
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
In the JavaScript and CSS content handlers we render the page "as
wikitext" solely to generate categories, toc, etc, and then throw that
output away and replace the generated HTML. Simplify the code paths
and the caching by using the canonical options which don't split by
user language, etc.
Three minor issues with the current patch, which can hopefully be
addressed in follow ups:
1. WikiPage::makeParserOptionsFromTitleAndModel() has a very cumbersome
name and arguably doesn't belong in WikiPage in the first place.
T313455 already exists to find a better place for this/way to do this.
2. Title::isConversionTable() requires a downcast of the page reference
to a full title object. This method also probably wants to live
somewhere else.
3. It really would be nice to combine this more properly with
ContentHandler::getParserOutputForIndexing(), but that method
uses a ParserOutputAccess object which requires a PageRecord,
and we don't have a PageRecord available in fillParserOutput().
Bug: T307691
Change-Id: I081105741b507ed49e19cb878550ba4293e09413
|
|\ \ \ \ \ \ \ \
| | |_|_|_|/ / /
| |/| | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This ParserOutput flag will be renamed, so let's rename the API
property as well before this escapes out into the wild.
Bug: T314000
Change-Id: I1644a74370b42b04d0db167879f7de2207ebfcf5
|
|\ \ \ \ \ \ \ \ |
|
| | |_|_|_|_|_|/
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
According to docs on IDatabase::getDBName, a database does not
neccessarily have a name, so the function may return null in
such a case.
This fixes a unit test failure on php8.1 involving making cache
keys out of nulls
Bug: T313663
Change-Id: Iba880e2060d9c04ff07b883500cd653148eb54bf
|
|\ \ \ \ \ \ \ \ |
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Cast to string. We need to check for both empty string and null.
PHP 8.1 does not like passing null to strlen.
Bug: T313663
Change-Id: Icedb96fcf39bba70193fe30de5a8385b62040175
|
|\ \ \ \ \ \ \ \ |
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* This lets us meet CI requirements that expect tabs instead of spaces
in JSON files.
Change-Id: I91170d60753b083349fda044e268ef3933aa7abe
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
overrideConfigValues is documented to reset services as well
Change-Id: Ie13a699f6cd912b912d34adb97704bab3cbdff2d
|
|\ \ \ \ \ \ \ \ \
| |_|_|_|_|_|/ / /
|/| | | | | | | | |
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Returning a null from preg_replace means an error happened in
processing the regex. If the regex being used is constant and
a unicode one, that means that almost certainly the issue is an
invalid utf-8 sequences. So throw appropriate exception if that
happens.
Bug: T313663
Change-Id: I9ab184fbddd95dd0317fc42a5690cf5179c4192e
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Bug: T314048
Change-Id: I5755863243d8ad336ad20626f439d70eb3b31f32
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
php8.1 is more strict where we can return nulls
Bug: T313663
Change-Id: I079ec2cc732d44710d2ba001f803d96134f0d6c0
|
|\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
When I implemented the ParserOutput merge logic in OutputPage
(I0909ac85c6c785d9089b077a16923c61d6a09996) I realized that
consistent "combine with OR" merge logic for the TOC flag
is obtained only if we invert the flag; that is, the existing
code showed a TOC *if any ParserOutput contained a shown TOC*
otherwise the TOC was hidden.
I'd originally implemented this in
I35e199cca40c0e4359ac493e5806dcf4ae49321c with the opposite sense in
order to avoid having to wait for ParserCache contents to expire:
since the default on most pages was to have the TOC shown anyway, if
"out of date" parser cache entries were missing a HIDE_TOC flag, it
wouldn't be a big deal, whereas if a SHOW_TOC flag were required then
upon deploy all cached pages would lose their TOC rendering.
BUT a better solution is just to let a "parser cache expiration time"
elapse between the time we start generating this flag and the time we
start using it. The existing patch to export this
(I6cf76c870124c162dc1bcbc2f7e9ca0c5fdcd10e) uses
ParserOutput::getTOCHTML() anyway, so we can just wait to switch this
over to use the SHOW_TOC flag
(I10c3d06fb162103c06395bf9d1d27ac3c199d7b6) until the parser cache has
expired.
Anyway, this is a bit of a hassle to switch now, but I think having
consistent merge semantics for ParserOutput flags is worth the
short-term pain.
Bug: T310083
Change-Id: I3b76010f1e2283add629b84bf3824f215f932903
|
|\| | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This now aligns with Parsoid commit 6488f4ff1c95990bef9dfc15e54c7646b8c8c8f6
Change-Id: Idfd7d49c78c1f3a23bd06809ae99d1d34c611479
|
|\ \ \ \ \ \ \ \ \ \
| |_|_|/ / / / / / /
|/| | | | | / / / /
| | |_|_|_|/ / / /
| |/| | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
These tests appear to have been present previously, but were inadvertently
omitted from the refactor in fa5237eb48a3c755797f0dce878e14c6fa8d40ff.
This patch just updates the tests to undo code rot and re-enables them.
It contains some placeholders for T307691 tests as well, which will be
enabled in a follow-up patch.
Change-Id: I73d0ed406b3ca8f94b384b76d6e01a5ca1b58e12
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
month"
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Calling .setFocusedDate() ends up calling .setData() on the button
with the data for the next month, causing the second call to
.getData() to read data for the next-next month. Just call it once.
Bug: T311256
Change-Id: Ic33d36bc10c33bad688dabb1c42bdb1e66553fd4
|
|\ \ \ \ \ \ \ \ \ \
| |_|_|_|_|_|_|/ / /
|/| | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
On a live site configured for WRITE_NEW, no new templatelinks rows in
which tl_target_id IS NULL should be added. Assuming this is the case,
the conditions on PK fields (tl_from, tl_namespace, tl_title) should
suffice to limit the number of affected rows, since the range of page
IDs is limited and only one distinct target ID is filled at a time.
This avoids a needless "Updated 0 rows" query for every link target
within a batch.
Change-Id: I8af72ca8fe4c68da1603670d065a2b51ab96b79d
|
| |_|_|_|/ / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Change-Id: Id89354f002a5bd1e7f810c581f5f9663f660edf3
|
|\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Follows I3ea6fb26296f (MySQLPlatformTest):
* Avoid uncertainty and make the code improvable/removable by explaining
what the suppression is for.
* Remove use of outdated AtEase, which hasn't been used in core tests
for several months (ref phpcs.xml), and more generally not in new code
in core or extensions (ref T253461).
Follows I12c17e327628 (FileBackendTest):
* I was going to similarly explain the reason by stating from the linked
task that it is for preg_match, and I was goingn to move the wholesale
suppression to just the getMockForAbstractClass() call that constructs
the FileBackend and thus triggers the issue.
* Instead, I've fixed the constructor to not pass a string there in the first
place as all non-string values are naturally invalid. Even if there is
a way to satisfy the regex with a non-string value that casts to a
valid string, that'd be an invalid value for a FileBackend name as it
pubicly documented as requiring a string, and internally also stored
and typed as assumed to be (after validation) a string.
* Change the valid test cases to be more representative of actually
intended-to-be-valid input, and actually-likely-attempted-but-invalid
input. The regex permits `[a-zA-Z0-9-_]` yet no numbers, capitals
or dashes were validated by the test, and no special characters
rejected by the test.
This follows If29780653 (c250d07bac) from 2019 which added these test
cases to improve code coverage without input from any (admitedly,
non-existent) active maintainers.
Bug: T313663
Change-Id: Ia326e17231a53c7102dcb116817a0c3830c510e4
|
|\ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Previously this returned null which causes warnings in php8.1
Bug: T313663
Change-Id: I762e8b7337edf739ac8d55456a929add2c16b8c7
|
|\ \ \ \ \ \ \ \ \ \ \
| |_|_|_|_|_|_|_|/ / /
|/| | | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Passing ints here is deprecated in php 8.1. Additionally, it is
almost certainly not what we want, since an int to this function
is interpreted as an ascii code point (e.g. ctype_digit( 1 ) is
false. It is true for ints between 48-57 and > 255).
In practise this doesn't change much, since there is also an
is_int check here.
Bug: T313663
Change-Id: I11f3c710ba667d0f01574856af8f3da11d0b7f15
|