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
More could be done, but to keep this patch reasonably sized, I only
changed the most obvious and unambiguously correct cases.
In some cases, I also removed redundant doc comments on the
constructor, and re-ordered the properties to match the constructor.
Change-Id: I819ed771c915293663856c577a481d607b76ed80
Why:
* The ability to block temporary account usernames with 'hideuser'
needs to be added so that we can hide the username of temporary
accounts in the case of accidental logged out edits by editors.
* This brings similar behaviour how IP addresses are hidden on
WMF wikis, as the IP addresses are hidden for logged out edits
using the suppression tool. Blocking the account with 'hideuser'
allows all edits to be hidden plus also prevent further editing
using that temporary account.
What:
* This reverts commit 878602ad97.
Bug: T355430
Change-Id: I7b38d2bf0155df479a179c69c91cfe1987bd234a
Ensure that temporary users cannot have their name hidden via a block.
Temporary users are now handled the same as IP users:
* SpecialBlock: the option to hide a user is disabled if the target
entered is a temporary user name
* BlockUser: the option to hide a user cannot be set to true if the
target is a temporary user; however a non-hiding block is still made
Bug: T343705
Change-Id: I47b2ca55797d4e7d9dc1b61d0368e1269ad0fd3c
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
These three classes:
- TitleArray
- TitleArrayFromResult
- TitleFactory
We need to move these and the rest of files under title/ to Title/ (and
namespace them) but the patch will become way too big given that Title class is
also one of them.
Bug: T321882
Change-Id: Iac1688172ee457348a08a470c86e047571feb8e0
Rather than having to do DatabaseBlock calls directly,
and then ManualLogEntry calls to facilitate logging,
let's create a BlockUser service, capable of blocking users
and logging, optionally with permission checking.
This should make blocking users easier for developers,
for instance, AbuseFilter or CheckUser can easily
benefit from this commit.
Bug: T189073
Change-Id: Ifdced735b694b85116cb0e43dadbfa8e4cdb8cab
Following 23c3c70d7f, soft deprecate the static methods on
DatabaseBlock that have been moved to DatabaseBlockStore:
* ::insert
* ::delete
* ::update
* ::purgeExpired
Update calls to the deprecated methods from core.
Change-Id: I1272eb978594fd4f386bda12cbc24131ad7d882f
Create UnblockUserFactory service, which returns an UnblockUser.
UnblockUser::unblock replaces SpecialUnblock::processUnblock, which
is now deprecated.
Update SpecialUnblock and ApiUnblock to use UnblockUser, removing
the API module's dependency on the special page.
Update SpecialUnblock::processUIUnblock to use UnblockUser, and mark
it for internal use only. It now returns a Status object.
Also add BlockPermissionChecker::checkBasePermissions, which checks
for the 'block' right and the 'hideuser' right if necessary.
Bug: T250020
Change-Id: Ide31da469297f4582ad0e3f7f1a7c40d542923f8