| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
The doc block is identical to the type declaration for each argument.
Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
| |
Bug: T353458
Change-Id: I09e66c3223018ec47e0549ee7f6a590b676f4eef
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* SpecialMute::getFormFields currently calls
User::getEmailAuthenticationTimestamp to determine whether a user
has a confirmed email address.
* This works if $wgEmailAuthentication is set to true, but fails
if this is false as no email confirmation timestamp will be
set.
* Using User::isEmailConfirmed will check for this situation and
is used by many other classes that require that a user have
a confirmed email address.
What:
* Replace the call to User::getEmailAuthenticationTimestamp with
a call to User::isEmailConfirmed in SpecialMute::getFormFields.
Bug: T356636
Change-Id: Iaedd6d01a03c79c7b6a09f0a8f6a7dde810bdd2a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make it possible to mute temporary users (was disabled in
09b64632d474ab5088ebef42de244a8366a82d5a).
Temporary users still cannot mute other users (since they don't have
access to preferences).
Bug: T344647
Change-Id: Ib8c96dfa83b0d6cf677b493ed3fa91a5906e426b
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Leave the main error as a fall-back if the hook runner clears it
for whatever reason.
Bug: T280465
Change-Id: I7184564b4fde9dc378796132b8b66c3b46c76728
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deprecate returning a string from SpecialPage::getDescription(), which
encourages good localization as well as helping us shift from
OutputPage::setPageTitle() to ::setPageTitleMsg(), which in turn helps
improve the accuracy of phan-taint-check.
In the process, special page description messages are formatted using
FORMAT_ESCAPED by OutputPage::setPageTitleMsg(), which is a change from
FORMAT_TEXT used prior to this patch. Descriptions shouldn't contain
raw HTML, but if a description message previously contained an HTML
metacharacter like <, >, or &, it will no longer need to be escaped
in the message localization.
Bug: T343994
Bug: T343849
Depends-On: I1a27f7697dffd3142cdbab0c8cd9854b2b94dd3a
Change-Id: Ifc3452548c44a021414cf8433c1ffbb683a9d55b
|
| |
| |
| |
| |
| | |
Bug: T166010
Change-Id: Ibda1e8be0f23c6262a32b607f8260cad36f188fc
|
| |
| |
| |
| |
| | |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|/
|
|
|
|
|
| |
SpecialPageFactory is already here, but none of the others were yet.
Bug: T166010
Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
|
|
|
|
| |
Change-Id: I403664ce3585f022e89da75e75baefa4b4db29f9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: I64a6d3bb24d38b9fe603f817c419292f385f2795
|
|
|
|
|
|
|
|
| |
Add a service for convenient interpretation of UserIdentity instances,
especially relating to the TempUser migration.
Bug: T341976
Change-Id: I94e8620cd3187f41f04cdf24b5b553baadfbc22d
|
|
|
|
| |
Change-Id: I3f733dcef861f26e0938185605f88c0e316a9291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Illegal string offset and invalid argument supplied to foreach, due to incorrect type information
* Array internal pointer reset is unnecessary
* $hookData unused since MW 1.35 due to incomplete revert
* array_push() with single element
* Unnecessary sprintf()
* for loop can be replaced with str_repeat()
* preg_replace() can be replaced with rtrim()
* array_values() call is redundant
* Unnecessary cast to string
* Unnecessary ternary. Often the result relies on short-circuit evaluation, but I find it more readable nonetheless.
Change-Id: I4c45bdb59b51b243fa96286bec8b58deb097d707
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A temp user is not allowed to receive emails,
so there is no need to allow him to mute other users
A temp user cannot set a email and is never a sender of emails,
no need to allow other users to mute the temp user.
Bug: T331058
Change-Id: I35280f6a395f36f0f8aee4e1b6c3959056001111
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hook was deprecated in 1.35.
Further, the hook was only introduced to power the SpecialMuteSubmit
instrument for the User Mute Features Community Health Initiative
project [0].
[0] https://meta.wikimedia.org/wiki/Community_health_initiative/User_Mute_features
Bug: T329718
Depends-On: I2b014dbae0df278f3e051955c1b086a8c7b78fdf
Change-Id: I0c100eb6f3008003ce9678c3dd8346862ae8a914
|
|
|
|
|
| |
Bug: T325474
Change-Id: I757cad8b9c997f1914f02d18469428042ed8b2b6
|
|
|
|
|
|
| |
It has been deprecated since 1.35 and it is unused.
Change-Id: I68588f626087cf6a94d98aa01ac82cea715e768a
|
|
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
|
| |
This helps phan to understand that the value is not-null after the check
Change-Id: Ifdac7ed99a873fed011d8357a657b30e59b8d1fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of our wider work on modernising and making more welcoming the
language we use within and around MediaWiki, now is a good time for us
to rename these configuration variables:
- $wgFileBlacklist is now $wgProhibitedFileExtensions
- $wgMimeTypeBlacklist is now $wgMimeTypeExclusions
- $wgEnableUserEmailBlacklist is now $wgEnableUserEmailMuteList
- $wgShortPagesNamespaceBlacklist is now $wgShortPagesNamespaceExclusions
Bug: T277987
Depends-On: I91e065c58fda144a722a41cf532e717f962d7a64
Change-Id: I558a8b20d67d48edccce0d065aec2d22992e9dda
|
|
|
|
| |
Change-Id: Ia0f263b4eff00cc6efee7a88c62d562dafd57950
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
… including PHPDoc tags like `@return <type> $variableName`.
A return value doesn't have a variable name. I can see that
some people do this intentionally, repeating the variable
name that was used in the final `return $var;` at the end
of a method. This can indeed be helpful. I leave a lot of
these untouched and removed them only when it's obviously
wrong, or does not provide any additional information in
addition to what the code already says.
Change-Id: Ia18cd9f25ef658b08ad25b97a744897e2a8deffc
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I395b5f1543786e664e5f81764468d29a6ca3d402
|
|/
|
|
|
|
| |
Soft deprecated in 1.35, no usages remain.
Change-Id: I04a243f25080d9de5074942de30473ff49b9d501
|
|
|
|
| |
Change-Id: Idf48ce8718932f49344edf7520adccfcfb598d27
|
|
|
|
| |
Change-Id: I5a1d2c52b8af3b6209d913ecfaa57bc73eb6daa4
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I70b2b6f456a5036b7b4e83a0f4d7396e91b5bfbe
|
|/
|
|
|
| |
Bug: T257183
Change-Id: I7af57455d412dc5e93617ca0b3d6e7aac8ef500f
|
|
|
|
|
|
|
| |
Config options still need updating
Bug: T254646
Change-Id: Ib63816236abbd6215b2f68d06e80f9403543b5bb
|
|
|
|
|
|
|
| |
* Add public accessor for target. Needed by Echo in I563f3f3
Bug: T251687
Change-Id: Ie41331fe37ba08dba343f2b229d2374c0443a074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate all callers of Hooks::run() to use the new
HookContainer/HookRunner system.
General principles:
* Use DI if it is already used. We're not changing the way state is
managed in this patch.
* HookContainer is always injected, not HookRunner. HookContainer
is a service, it's a more generic interface, it is the only
thing that provides isRegistered() which is needed in some cases,
and a HookRunner can be efficiently constructed from it
(confirmed by benchmark). Because HookContainer is needed
for object construction, it is also needed by all factories.
* "Ask your friendly local base class". Big hierarchies like
SpecialPage and ApiBase have getHookContainer() and getHookRunner()
methods in the base class, and classes that extend that base class
are not expected to know or care where the base class gets its
HookContainer from.
* ProtectedHookAccessorTrait provides protected getHookContainer() and
getHookRunner() methods, getting them from the global service
container. The point of this is to ease migration to DI by ensuring
that call sites ask their local friendly base class rather than
getting a HookRunner from the service container directly.
* Private $this->hookRunner. In some smaller classes where accessor
methods did not seem warranted, there is a private HookRunner property
which is accessed directly. Very rarely (two cases), there is a
protected property, for consistency with code that conventionally
assumes protected=private, but in cases where the class might actually
be overridden, a protected accessor is preferred over a protected
property.
* The last resort: Hooks::runner(). Mostly for static, file-scope and
global code. In a few cases it was used for objects with broken
construction schemes, out of horror or laziness.
Constructors with new required arguments:
* AuthManager
* BadFileLookup
* BlockManager
* ClassicInterwikiLookup
* ContentHandlerFactory
* ContentSecurityPolicy
* DefaultOptionsManager
* DerivedPageDataUpdater
* FullSearchResultWidget
* HtmlCacheUpdater
* LanguageFactory
* LanguageNameUtils
* LinkRenderer
* LinkRendererFactory
* LocalisationCache
* MagicWordFactory
* MessageCache
* NamespaceInfo
* PageEditStash
* PageHandlerFactory
* PageUpdater
* ParserFactory
* PermissionManager
* RevisionStore
* RevisionStoreFactory
* SearchEngineConfig
* SearchEngineFactory
* SearchFormWidget
* SearchNearMatcher
* SessionBackend
* SpecialPageFactory
* UserNameUtils
* UserOptionsManager
* WatchedItemQueryService
* WatchedItemStore
Constructors with new optional arguments:
* DefaultPreferencesFactory
* Language
* LinkHolderArray
* MovePage
* Parser
* ParserCache
* PasswordReset
* Router
setHookContainer() now required after construction:
* AuthenticationProvider
* ResourceLoaderModule
* SearchEngine
Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7
|
|
|
|
| |
Change-Id: I0ccda3d1de29b1044f74ef0972949eb8fbcb707d
|
|
|
|
|
| |
Bug: T244402
Change-Id: I6c532e5bbdea749163158c2a3c50233903ea8ca3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are already tracking pageviews and with following change we should be able
to answer the following questions:
* Of the users who land on this page, what percentage of users actually
mute or unmute someone
* Of the users who mute a user, which option(s) did they check/uncheck in order
to mute/unmute the user
EventLogging Schema: https://meta.wikimedia.org/wiki/Schema:SpecialMuteSubmit
Bug: T224958
Change-Id: I655dbd999fd5d3d8f792c4f53b7cc502fe05afd5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hook (SpecialMuteModifyFormFields) is used to append
the option to mute/unmute notifications from a specified user.
Special:Mute handles posting and saving the fields, the only
requirement is that the field name is the same as the property
that wants to be modified.
Currently there are only two notifications "blacklists":
* `email-blacklist` is directly handled in this page 'cause it is part of core.
* `echo-notifications-blacklist` is part of Echo, so this change is required
to support it. See I77b3ccfdce9b501e
Bug: T220163
Change-Id: I2b3eee0802cb086091f35ecce13ae77a8e7d518d
|
|
- Special:Mute has been added as a quick way for users to block unwanted
emails from other users originating from Special:EmailUser
- Special:Mute can be enabled by setting $wgEnableSpecialMute = true.
This flag default value is `false`. This flag is temporary until
enough wikis have this feature enabled and then it will go away
- When Special:Mute is enabled, emails sent from Special:EmailUser
contain a link to Special:Mute to facilitate access to the page
In the future, Special:Mute will support extensions to append other types
of notifications that could be muted. These are some of the tasks tracking
the rest of the work:
- T218270
- T220163
- T218266
It is worth mentioning that blocking emails from users is already available
via Special:Preferences
Bug: T218265
Change-Id: I54b847192f42ee1f37999d36c3a187f8826f55a8
|