| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ib394792b10afabf5e0440cd3be34c1f2fd9cfe1d
|
|
|
|
|
|
|
|
|
| |
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be
changed later if people really care). Also, move the couple of exceptions in
here that were already namespaced in the MW-top-level into the new space.
Bug: T353458
Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
|
|
|
|
|
| |
Bug: T353458
Change-Id: I2ae4577de79832b082adca282ff73cfabc8f9392
|
|
|
|
|
| |
Bug: T353458
Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
|
|
|
|
|
|
| |
The doc block is identical to the type declaration for each argument.
Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
| |
Found by Phan thanks to the type hints being added in
I3e0df790ff9db2fa630f82408a7254a359fe61ca.
Bug: T378876
Change-Id: I286a4a51e879bdf61f65c87dc078621c51045bee
|
|
|
|
|
|
|
|
|
| |
A constant is not a variable. The type is hard-coded via the value
and can never change. While the extra @var probably doesn't hurt much,
it's redundant and error-prone and can't provide any additional
information.
Change-Id: Iee1f36a1905d9b9c6b26d0684b7848571f0c1733
|
|
|
|
|
|
| |
Use expression builder instead
Change-Id: Ic68fde5a2da37aa3d8004b303c43500076617e6c
|
|
|
|
|
|
|
|
|
| |
This adds MediaWiki\Watchlist namespace to the classes of watchlist
directory and adds deprecation notice since 1.43 to the just created
unnamespaced aliases of the classes.
Bug: T353458
Change-Id: I4234f8fe62bb3bde6f5271c7ba31a2420b0f4b90
|
|
|
|
|
|
|
|
|
| |
This patch introduces a namespace declaration for the
MediaWiki\Watchlist to WatchedItem and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: Id2a582b624f21867240def2541c98ce5b1bd12b4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add relevant `@ingroup` to special pages that belong to a specific
component and for which a doc group is already defined (defgroup),
e.g. "Upload" for SpecialUpload, "JobQueue" for SpecialRunJobs.
* Remove duplicate descriptions from file blocks in favour of class
doc blocks. This reduces needless duplication and was often
incorrect or outdated, and helps make file headers more consistently
(visually) ignorable.
Add missing `ingroup` to class blocks (and remove any from file blocks)
as otherwise the file is indexed twice (e.g. in Doxygen) which makes
navigation on doc.wikimedia.org rather messy.
Ref https://gerrit.wikimedia.org/r/q/message:ingroup+is:merged
Bug: T364652
Change-Id: I795c43b6d72782d457c963e352d7e1b022c2b641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See also I61c8f671273 in CentralAuth. For improved clarify, I'm
mostly replacing it with Html::element() rather than Html::input().
While at it:
* Fix incorrect docs that state the opposite of what
is true in Html::input. Especially confusing when coming from
Xml::input, as it implies that the behaviour is less secure, when
actually its the same (plain text, automatically escaped by
Html::element as any other attribute value).
* Make $attrs optional in Html::submitButton, like Xml::submitButton.
* Improve the Basic form rendering in RecentChanges/Watchlist to
build the two copies of the same inputs the exact same way,
and to do so without needless `<input id><label for>` complexity,
but instead wrap the label around the input.
Rendering is pixel-identical (verified in Firefox) and removes the
need to attach the same title="" attribute twice in the HTML output
(on both the input and the label element previously).
* As side-effect of this chnage, SpecialUserRights no longer
unexpectedly sets `class="mw-userrights-groupcheckbox"` on both
the checkbox `<input>` and on the `<label>`, something the
userrights.css stylesheet works around by narrowing the selector
to just `input.groupcheckbox` because otherwise it would never
be `:checked` since the label element is by definition never
checked. Yet another indication that the abstraction is a bad fit,
and yet people stuck with it well beyond even the narrow case where
it happens to work.
Change-Id: I33bf6ab5e013f046c5f31c6ceae118d6240c5294
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a couple of user options related classes already,
and the T321527 work on dynamic defaults is going to add
even more. Let's move them into a separate namespace
to make core a bit more organized.
Old name is kept as an alias for compatibility purposes.
Bug: T321527
Bug: T352284
Change-Id: I9822eb1553870b876d0b8a927e4e86c27d83bd52
|
|
|
|
|
|
|
|
|
|
| |
Filters in RC (and watchlist) can be used to only display
edits by unregistered users. With IP Masking, this should
include temp users as well. For clarity, change the description
message in that case.
Bug: T343322
Change-Id: Ic3882894e65eb54e00871e054fcb6015e2d3b20a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Done via
'([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$3->expr\( '$1', '$2', $4 \)
And
'([A-Za-z_\.]+) IS NULL OR ([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$4->expr( '$1', '=', null )->or\( '$2', '$3', $5 \)
Bug: T210206
Change-Id: I109bf2a712bdefa9e074f775b1bee41ac5b9d665
|
|
|
|
|
|
|
| |
One of the big ones, so doing this alone.
Bug: T166010
Change-Id: I4c901d5c32696d8334ec30cede7d9b6f3d8d645e
|
|
|
|
|
|
|
| |
SpecialPageFactory is already here, but none of the others were yet.
Bug: T166010
Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
|
|
|
|
|
|
| |
This completes the namespacing of core special pages.
Change-Id: I195e7fc34a9413bfea0a33c941f2362cd4a7ff10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly used find-and-replace:
Find:
/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|)
Replace with:
\3 \1 \4
Followed by some manual review to make sure I'm not changing too much,
omitting some changes that looked too complicated and anything that
caused test failures, and some whitespace fixes.
Change-Id: I27149404eedc19e68bf62836d79ae0f2b85cc4d0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following on from I1ccda3878a, if temp users are explicitly granted
viewmywatchlist and editmywatchlist rights in LocalSettings.php, make
the watchlist API and UI be functional for them.
The reasons for denying temp users access to the watchlist are mostly
Wikimedia-specific, and may change in future, so this provides a bit
more flexibility for third parties and for future use.
T330518 (Minerva watch star suppression) does not appear to regress.
This change does not cause a watch star to appear for Minerva, since it
is doing its own thing. A watch star does appear for Vector, conditional
on user rights.
Bug: T341976
Change-Id: Idfebd0f9ab939faa962dfad6d6f502c312c819fa
|
|
|
|
|
|
| |
Reduce raw sql fragments on simple compares
Change-Id: I3f2340dfdbf5197cc22546911e6c5653dc5a6269
|
|
|
|
|
|
|
| |
Deprecated.
Bug: T245964
Change-Id: I8ff03634564024560b354b5a770353866b9258da
|
|
|
|
|
|
|
|
| |
In all these cases the change should be compatible with all existing
callers. Most code still passes an IDatabase to this code. But each
IDatabase is also an IReadableDatabase.
Change-Id: Iae13cd780841b240b7369f6a7f5f38e88064fbd7
|
|
|
|
| |
Change-Id: Id456f920654bcf179b6ae24bdb061d58bcd5be33
|
|
|
|
|
|
|
| |
No longer used as of I7a31a07a8c3f1e265ac43ab59f23326590b407c3.
Bug: T263127
Change-Id: Ie58c0bb2ed8ff5b0fc6d4e42256010eb825fd9dd
|
|
|
|
|
| |
Bug: T330641
Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
- List view as subpage of Special:EditWatchlist so this also
shows up as a tabs
- Use skin option to determine whether to output the links in
skins that do not support sub pages
Bug: T316818
Change-Id: I1cee39c72cd0a49f97c3bdf41e07a4748502b1e2
|
|
|
|
|
|
|
|
| |
This has no PHP or JS UX visibility for now, which will come in later
patches.
Bug: T174349
Change-Id: I10c788cb7796096aa4a543e372ff06f9b01a7a41
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redoing I5ea70120d74 but without moving WebRequest that caused issues
with phan-taint-plugin.
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequestUpload
Bug: T321882
Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
| |
Change-Id: I2426db04fa943dfe7e490b9e06903fba31b1dc79
|
|
|
|
|
|
|
|
| |
The 'watchlist' query group no longer exists in WMF production since
T263127, and it's not included in the list of supported query groups
in docs/database.md.
Change-Id: I6ea5c65921891ac6a705a6ff7e79b08fa5a9bf42
|
|
|
|
|
|
|
| |
Later we can slowly rework how query building inside wtachlist works but
this is a start
Change-Id: If8808f8b180a3a17ab4548dac498989547db9a5f
|
|
|
|
|
|
| |
The legacy signature has been deprecated since 1.34 and it is unused.
Change-Id: I71ec41e84c2b6f574cbde441ce144ecb28c7e320
|
|
|
|
| |
Change-Id: I59f4f6313ff230c2d101bdaaf42cc8ae05d7a82f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the legacy version of Special:Watchlist and Special:RecentChanges
(available by enabling the preferences named "Use non-JavaScript
interface" on their respective tabs), there's a dropdown "Namespace"
and two checkboxes "Invert selection" and "Associated namespace",
which are hidden when the default value of "all" namespaces is
selected.
It doesn't seem worth it to maintain this feature. The checkboxes are
now always shown, even when "all" is selected.
The code implementing this was always loaded, thus causing a small
performance hit for all users, even when the new interface is enabled
(and even on other pages, since it was a separate ResourceLoader
module).
Change-Id: Ia5c4790358c5e631c2305343c8bdfddae15ce12b
|
|
|
|
|
|
| |
Found using IntelliJ's "Typo" code inspection.
Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* In PermissionManager, if a user is anonymous but temporary user
creation is possible, grant elevated permissions at RIGOR_QUICK rigor
level. This is mostly to make skins show "edit" instead of "view
source" to anonymous users in the recommended permissions
configuration.
* Present temporary users as if they are not logged in in various places
in the interface: create/move permissions errors, login, preferences,
watchlist, BotPasswords, ChangeEmail, ResetTokens.
* Show a warning on login/logout about loss of access to the temp
account.
* On login, don't show the temporary name as a suggestion for the login
username.
Change-Id: Id0d5ffa46c3ca5c7b30d540cedbaa528b682aa85
|
|
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T301035
Change-Id: I8ab1ba51b353e64252e0ab1ec3129caa55126d1b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The tag wouldn't be treated as active, wouldn't be displayed
in changes lists and it wouldn't be possible to filter it,
although it was possible to create it.
The changes in ::modifyDisplayQuery are needed, because
ContribsPager may provide false.
Add a regression test for ::formatSummaryRow.
Bug: T296642
Change-Id: Iddb1e978387a0009425f6fad1821d9d15c0f5f23
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Some functions accept only string, cast ints and floats to string
* After preg_matches or explode() casts numbers to int to do maths
* Cast unix timestamps to int to do maths
* Cast return values from timestamp format function to int
* Cast bitwise operator to bool when needed as bool
* php internal functions like floor/round/ceil documented to return
float, most cases the result is used as int, added casts
Found by phan strict checks
Change-Id: Icb2de32107f43817acc45fe296fb77acf65c1786
|