| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
A–F. Still need to do F–Z.
Bug: T353458
Change-Id: Ieb4bad0658b9cddc9403c6a55ef3bd1245aa08ae
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Maintenance scripts in core have bolierplate code that is
added before and after the class to allow directly running
the maintenance script.
* Running the maintenance script directly has been deprecated
since 1.40, so this boilerplate code is only to support a now
deprecated method of running maintenance scripts.
* This code cannot also be marked as covered, due to PHPUnit
not recognising code coverage for files.
* Therefore, it is best to ignore this boilerplate code in code
coverage reports as it cannot be marked as covered and also
is for deprecated code.
What:
* Wrap the boilerplate code (requiring Maintenance.php and then
later defining the maintenance script class and running if the
maintenance script was called directly) with @codeCoverageIgnore
comments.
* Some files use a different boilerplate code, however, these
should also be marked as ignored for coverage for the same
reason that coverage is not properly reported for files.
Bug: T371167
Change-Id: I32f5c6362dfb354149a48ce9c28da9a7fc494f7c
|
|
|
|
|
|
|
|
| |
Also:
1. Other minor fixes in comments touched by this patch.
2. Add a separate test for subpage with spaces.
Change-Id: I267f19027098e5778b1cd491826e1741fc7ee794
|
|
|
|
|
|
|
|
|
|
|
|
| |
And start using them instead of wfGetDB(), LB/LBF connection methods or
worse, $this->getDB().
$this->getDB() reuses the database object regardless of whether you're
calling a replica or primary, leading to returning a replica on a
primary and other way around.
Bug: T330641
Change-Id: I9e2cf85ca277022284fc26b9f37db57bd12aaa81
|
|
|
|
| |
Change-Id: Ia8ea294b7bc961fe34dd4457a8eabc27f41c4056
|
|
|
|
|
| |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|
|
|
|
|
|
|
|
|
| |
They're under 'specials' because that's where they're mostly used,
but they're just another kind of Pager (shown by their use outwith
the MediaWiki\Specials hierarchy, which is a bad code smell for us
to review later).
Bug: T166010
Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Use DeletePage instead.
Change-Id: Icf064d6f8ce609d1119b45377af037ed03e464a4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Maintenance class provides a method for getting a fresh reference
of the MW services container instance. Let's make use of these in
maintenance scripts now that we have it.
NOTE: There are still some static methods like in refreshLinks.php
that makes use of services that we can't use this method for now.
Change-Id: Idba744057577896fc97c9ecf4724db27542bf01c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
| |
| |
| |
| |
| |
| | |
Easier to spot the documentation what happen with this option
Change-Id: I6764dff8f79a6e667a0f4f61336f6280c7f13ed2
|
| |
| |
| |
| |
| |
| | |
Doc-only changes
Change-Id: I5177f582ae7ee70c357e9389fed14819faf79463
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
This adds reconfiguring db pools in case a replica gets depooled
Bug: T298485
Change-Id: Id052ce8ed45c51e51b071778858d27b48605bf93
|
|/
|
|
|
| |
Bug: T166010
Change-Id: Idcf0e9dc6e0841e4f132207bce0f96774dad898c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch deprecation warnings will be emitted
if $wgUser is accessed or written into. The only pattern
of usage still allowed is
$oldUser = $wgUser;
$wgUser = $newUser;
// Do something
$wgUser = $oldUser;
Once there is no deprecation warnings, we know that nothing
legitimately depends on $wgUser being set, so we can safely
remove the code that's still allowed as well.
Bug: T267861
Change-Id: Ia1c42b3a32acd0e2bb9b0e93f1dc3c82640dcb22
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) The following methods were hard deprecated:
- User::addAutopromoteOnceGroups
- User::getEffectiveGroups
- User::getAutomaticGroups
- User::getFormerGroups
2) User ::getGroups, ::getGroupMemberships, ::addGroup,
::removeGroup were replaced in the production code,
but they were not hard deprecated because of conflict
with UserRightsProxy class.
Bug: T275148
Change-Id: Ia69598316f5dc5dd9511f6112b5b13e1aa07575a
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This covers only directly used services by this special page and pager
Services used by the base class are not part of this patch set
Have to change the signature of one static function to avoid global
state and changed the caller as well
Bug: T259960
Change-Id: I9502c6cfd718b6edb074a50931094fcdbf2c48de
|
|/
|
|
| |
Change-Id: I5b2d4313f986484368da9b63c9a19892c2328dae
|
|
|
|
| |
Change-Id: I337147d61e2ec686a8672d0340dff4b6783f78cd
|
|
|
|
|
| |
Bug: T248000
Change-Id: I48bcf68e90209c5cfc2b7fedbf70fdffc374ec64
|
|
|
|
| |
Change-Id: Iad3375b141b1d87c890baec6ecd16ed92f93e699
|
|
|
|
|
|
|
| |
Brought to you by vim macros.
Bug: T200246
Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a
|
|
|
|
|
|
|
| |
This helps to find renamed or misspelled classes earlier.
Phan will check the class names
Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
|
|
|
|
|
|
|
|
| |
Deprecate the second argument to Maintenance::error() in favor of a new
Maintenance::fatalError() method. This is intended to make it easier to
review flow control in maintenance scripts.
Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
| |
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
|
|
|
|
| |
Change-Id: I9ad6745d84506b736dae94747256caac89715899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AuthManager is coming, which will make it easier to add alternative
methods of authentication. But in order to do that, we need to finally
get around to ripping the password-related bits out of the User class.
The password expiration handling isn't used anywhere in core or
extensions in Gerrit beyond testing for expired passwords on login and
resetting the expiry date on password change. Those bits have been
inlined and the functions removed; AuthManager will allow each
"authentication provider" to handle its own password expiration.
The methods for fetching passwords, including the fact that mPassword
and other fields are public, has also been removed. This is already
broken in combination with basically any extension that messes with
authentication, and the major use outside of that was in creating
system users like MassMessage's "MediaWiki message delivery" user.
Password setting methods are silently deprecated, since most of the
replacements won't be available until AuthManager. But uses in unit
testing can be replaced with TestUser::setPasswordForUser() immediately.
User::randomPassword() and User::getPasswordFactory() don't really
belong in User either. For the former a new PasswordFactory method has
been created, while the latter should just be replaced by the two lines
to create a PasswordFactory via its constructor.
Bug: T47716
Change-Id: I2c736ad72d946fa9b859e6cd335fa58aececc0d5
|
|
|
|
|
|
| |
Follows-up 49107fcc2.
Change-Id: I1b4b3f89a383a9b010d557ae0c6cbd767be60fb0
|
|
|
|
|
|
|
|
|
|
|
| |
Set the $commit parameter of WikiPage::doDeleteArticle() to true so
the transaction it starts is explicitly committed. Also fixed similar
bugs in two other maintenance scripts.
Follows-up 02f17b579060.
Bug: T110189
Change-Id: Ifde98066e25cb616f23c8998f9461ebf7a2073d6
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up d15f1cc5e1d6db78.
Previous output:
> 474 pages in the MediaWiki namespace ' .
> 'override messages.
> 4 pages are equal to the default message ' .
> '(+ 0 talk pages).
Change-Id: I6104f716f7dc32d638a2f5a7c37c3a507efad7dd
|
|
|
|
| |
Change-Id: Ib26407bc55dff7969d8a3b1e2ae51751b202d8fb
|
|
|
|
| |
Change-Id: I5d86ad3e0c90e09440268a670f5af3e2bf080612
|
|
|
|
|
|
| |
No internal changes to Special:Allmessage etc made
Change-Id: I21a164af0b6ec123bf654cd1e4e7085b1192f067
|
|
|
|
|
|
|
| |
* The delete calls already try to start transactions. Also CLI scripts
run in autocommit mode anyway.
Change-Id: I433691b3e4e578983e4e15334248f029e0b0d277
|
|
|
|
| |
Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
|
|
|
|
|
|
|
|
|
|
|
| |
The main purpose of this script is to purge local overrides to
avoid them from blocking an i18n update in the future.
However empty messages should remain empty and often have a
richer edit history (e.g. Sitenotice) and may not stay empty
for long.
Change-Id: I5b416cda25a3641862df9919c46ae59ad5d5d6e0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
|
|
|
|
|
|
| |
Follow-up 8be2e118
Change-Id: Ic72a8f24fdcbafcb689370c845dcf6df4f864493
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously it ran for either the base pages (comparing against
content language) or 1 lang-code subpage.
And the latter was actually broken as it forgot to add the
subpage back on, thus resulting in incorrect deletions
(deleting MediaWiki:Foo instead of MediaWiki:Foo/nl).
Also fixed a bug where it used the subpage lang-code to create
a Language object and call ucfirst(). Page titles should only be
capitalized by content language.
Bug: 48050
Bug: 43917
Change-Id: I2680413c276365a44c935a6f6fdd740daa86341e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
|
|
|
|
|
|
|
|
|
|
| |
Also clarify that the talk page number is in addition to the
other number. So it says "10 pages are equal (+ 2 talk pages)"
instead of "10 pages are equal (2 talk pages)".
Document better that the default is a dry run.
Change-Id: I95edb08d7b92c393ed226bef2575e52a6135f8df
|
|
Change-Id: I97529b775d4db4f996c40395c891a0049d2e43c5
|