| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T341775
Change-Id: I0f93cfa546580fe5544b781f0dd138877b5850b4
|
|
|
|
|
| |
Bug: T341779
Change-Id: I97f377db80be9ee840ad101436233b40205590ad
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I1da4b272a6b28c419cc8e860d142dae19ca0bbcf
|
|
|
|
|
|
|
|
| |
This touches various production classes and maintenance scripts.
The code should do the exact same as before. The main benefit is that
the syntax avoids any repetition.
Change-Id: I5c552125469f4d7fb5b0fe494d198951b05eb35f
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ic4d4dd61de5ab896fb6173eb579c81f164a1e4a3
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces a new namespace declaration,
MediaWiki\Xml and adds Xml and XmlSelect to it
and establishes class aliases marked as deprecated
since version 1.43.
Bug: T353458
Change-Id: I45cccd540b6e15f267d3ab588a064fbeb719d921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Xml::buildTable and ::buildTableRow
No direct replacement.
- Xml::dateMenu, ::languageSelector, and ::monthSelector
No direct replacement. No use in CodeSearch, so hard-deprecated
immediately.
- Xml::listDropdown, ::listDropdownOptions, and ::listDropdownOptionsOoui
Replacements already available in Html, and migration underway.
Change-Id: Idbed5016e0d5d518690dd2f02a41ad68bfdbab9a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's a dropdown, not a drop down, therefore rename:
* Html::listDropDownOptions → Html::listDropdownOptions
* Xml::listDropDownOptions → Xml::listDropdownOptions
* Html::listDropDownOptionsOoui → Html::listDropdownOptionsOoui
* Xml::listDropDownOptionsOoui → Xml::listDropdownOptionsOoui
* Xml::listDropDown → Xml::listDropdown
In PHP, method names are case-insensitive, therefore we can do this
without a breaking change or deprecation.
This also matches the naming convention in OOUI.
Change-Id: Ifda13ba9dee316709c424636ec3b285de8d0e9b1
|
|
|
|
|
|
|
|
| |
While this doesn't do much, it makes it easier to find such code in
the IDE.
Bug: T341775
Change-Id: I4206b6185074851c58dbfa5e955fc0f0fb61b0a7
|
|
|
|
| |
Change-Id: I2b49625a8519371dd392d0ba6786e2831cc5f83b
|
|
|
|
|
|
|
|
|
| |
Removing the config variable in a separate change:
Ib9966bc6a4a94f771cb99a5aa52fb6a1dc826ca5
(just in case something depends on its existence).
Bug: T182050
Change-Id: Ic3e038df16fc540ec7f6bcb9a54d73f8d596d305
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copied from MediaWikiSecurityCheckPlugin.php.
Duplicate annotations from Xml::encode* to the corresponding
Html::encode* methods, given that these were moved recently but not
hardcoded in taint-check.
As the only difference, remove the HTML taintedness type from the return
value of Message::rawParams. If the argument is unsafe, it's reported
immediately thanks to exec_html. Else, it does not contribute to the
taintedness of the return value.
Bug: T321806
Change-Id: I5ed340e1d127fb3eab6d6f9b905693d05a393360
|
|
|
|
|
| |
Bug: T166010
Change-Id: Id13dcbf7a0372017495958dbc4f601f40c122508
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
|
|
| |
These methods really belong in the Html class, not Xml. Leave behind
soft-deprecated Xml methods that forward to the Html ones, as well as a
class alias for HtmlJsCode (renamed from XmlJsCode).
Bug: T341779
Change-Id: I99a5f9de1411d4eb5ee30226b4e8ace3ea8b2c3b
|
|
|
|
|
| |
Bug: T328220
Change-Id: I3c36835fbd90acc301731e2b33ae4815cd4b0cc5
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
| |
The motivation is to make the code less confusing. I hope this is the
case.
?? is an older PHP 7.0 feature.
??= was added in PHP 7.4, which we can finally use.
Change-Id: Id807affa52bd1151a74c064623b41d950a389560
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ForkController, OrderedStreamingForkController: indeed pcntl_fork()
can't return false.
* RL\Image: Specify type instead of using suppression, since the issue
name changes.
* VueComponentParser: Accept complaint about nullable nodeValue.
* Disable PHP 8.0 polyfill stubs when running on PHP 8.0+ to avoid
duplicate interface errors.
* Add Socket stub and use it in LegacyHandler instead of multiple
existing suppressions.
* MemcachedPeclBagOStuff: accept complaint recommending !$result over
$result === false when the type is boolean.
* MemcachedPeclBagOStuff: fix probable bug, ignoring errors from
Memcached::getMulti(). Phan noticed that $res=false was unreachable,
but it should probably be reachable.
* DatabaseMysqli: accept complaint that $this->conn->errno is already
known to be an int. It was probably a hack for some previous version
of Phan.
* BcryptPassword, MWOldPassword, MWSaltedPassword: accept complaint that
the !is_string() checks are unnecessary, after code review of PHP.
* Pbkdf2PasswordUsingHashExtension: note that contrary to Phan's
suggestion, this check is necessary.
* DefaultPreferencesFactory: remove an existing hack for
array_diff_key(), no longer necessary on 7.4 and causes an error on
8.1. Use coalesce instead of cast for the remaining
array_intersect_key() hack since it better shows that we are casting
away null.
* FullSearchResultWidget: fix likely bug involving strict comparison
between a float and an int.
* SpecialWatchlist: accept complaint that $selectedHours is
unconditionally a float, being the return value of round(), and thus
the cast is unnecessary.
* Add stub for AllowDynamicProperties, resolving an error in User.php.
* Xml: accept complaint that $encMonth is already known to be an int.
Six errors remain. These need suppressions or otherwise conflict with
PHP 7.4 support.
Bug: T322278
Change-Id: Ie375bbc8ccf22330b9a169e8da98f2bbe26ec8b9
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
| |
Found using IntelliJ's "Typo" code inspection.
Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
|
|
|
|
|
|
| |
Bug: T294739
Depends-On: I84056024b0d3a9dcddb1ab4dc8596118bb3fe8ea
Change-Id: If005958c76bbfabba74def4215c48fe94f297797
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about scalar types by setting scalar_implicit_cast to
false (the default in mediawiki-phan-config)
Bug: T242536
Bug: T301991
Change-Id: Ia2fe30b17804186571722e728578121c8b75d455
|
|
|
|
|
|
|
|
| |
Swap null/false or use real strings if needed
Found by phan strict checks
Change-Id: Id82ea609f05a76c5cb8c661d5cf2b7922d6cfbc1
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: Icc44cd143f2e98fa3ca188e625a3289441de0f73
|
|
|
|
| |
Change-Id: I8521d00675008da0d7c8c768ab75352212653c66
|
|
|
|
|
|
|
| |
When the if branch continues the loop,
than the next branch does not need to be an else branch
Change-Id: Ia158709b7fd2ea811f1049cf8f53ed12c89719e3
|
|
|
|
|
|
|
| |
Previously done in 02db290c6406ebf1db5eadf308fcf4694b21929a, looks
like it was accidentally undone in 1262ca1897ea9c3f4afea86cbc25f98e24d840da.
Change-Id: I227ed9c6ba146fa249756f444f5c96ac2b5022b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When this code parses a string that looks like this:
*
** A
** B
It creates an option group with 2 options, but the name
of the group is an empty string. This makes the OOUI
DropdownInputWidget fail later.
Since the empty group name is useless anyway, drop it. This
makes the code behave as if the parsed string looked like
this:
* A
* B
Live example for the issue:
https://el.wikipedia.org/wiki/MediaWiki:Protect-dropdown
Bug: T275125
Change-Id: I780c1be27740b0ed3b35aa569b5a528112d7238f
|
|
|
|
| |
Change-Id: I3519dd5a1ce1ea688de602190cd74755c400c717
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Taint check checks for possible security issues by tracking html
escaping and more by using phan.
This slows done the phan-job a bit and requires more ram
Keep the DoubleEscaped issues out to make reviewer easier
Adds suppression for false positives
Adds taint-annotation to help taint-check
Removes suppression for code phan now understand better by the tracking
of keys in taint-check
Fix some small issues by adding int cast or htmlspecialchars calls
Bug: T216348
Bug: T268920
Change-Id: I849ac4f120fd15b483e8939d4db45c98dc351259
|
|
|
|
| |
Change-Id: I2fb18ddd4c144655a665792901e59f88bcd906dc
|
|
|
|
| |
Change-Id: I856b9bc4b62ddb8f03ed8f9111fc0dc037ff1046
|
|
|
|
|
|
|
|
|
| |
This includes fixing some mistakes, as well as removing
redundant text that doesn't add new information, either because
it literally repeats what the code already says, or is actually
duplicated.
Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515
|
|
|
|
|
|
|
| |
Instead use them as groupless reason list
Bug: T251351
Change-Id: Id691d97e3e6f205615f639e051619f3d0f67c7ba
|
|
|
|
|
|
| |
It is easier to read.
Change-Id: Ia3965b80153d64f95b415c6c30f526efa252f554
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `$selected` var could be null and in this case, return the default,
an empty string. The null check was after creating the XmlSelect
object which seemed out of place as after setting the variable to
the default, it's not used anywhere below.
Actually, the check should happen above and set it to it's default if
need be before creating the object below.
Change-Id: I6b69a7780c9f4a9ae283db8fa90b9cee76954d00
|
|
|
|
|
|
|
|
|
| |
There are a few messages that use a custom format for select
lists. This moves the parsing of these messages into a single
method.
Bug: T245565
Change-Id: I0a24d3458979d7cca2dc3cb38c1b0f700a88490a
|
|
Change-Id: I012648c9a860611a7cd809119073803e82429fc3
|