| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* The populateRevisionSha1.php maintenance script last had it's
update log key changed in MW 1.19 in c326cab5, and it has been
added to update.php since that version.
* This means that, since the script has been run via update.php
since before MW 1.35, it should be possible to remove the
script as all wikis will have run this script and therefore
it will be skipped for all wikis (as it's in the update log).
* Removing now unused maintenance scripts is important to reduce
the amount of untested code in the maintenance directory and
also prevents the need to update the code for migrations
(e.g. using the query builders).
What:
* Remove the populateRevisionSha1.php maintenance script.
Bug: T373238
Change-Id: Id3d46d6e0d4b8bd4aaf6d3ed01d7b759813c981a
|
|
|
|
|
|
| |
Replace BETWEEN with >= and <= operator
Change-Id: Ic21b6f4cc11c773c967d9d4c5f20e762c2ff9629
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: T344971
Change-Id: Ia727b513a6bfcaa5a0b13977a6789aa879ad2f0b
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Done semi-automatically via a php parser written on top of ANTLR4.
Bug: T311866
Change-Id: I33f5b6703c0aa9c80c907a21c2a770e30642edd3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PopulateArchiveRevId was part of the MW 1.31 updater, no longer
referenced and not useful, since ar_rev_id is NOT NULL.
DeduplicateArchiveRevId was part of the MW 1.32 updater, no longer
referenced.
Remove the backward compatibility code from UndeletePage as well
Follow-Up: I84bd1d3dbe777909e30710fff5bcb655af9a4261
Follow-Up: I5ff9630a6539a587a47930847e108ac53757106f
Change-Id: I7c4bb39ada74a1f06b45e8bfc05151cc8e00e9c6
|
|
|
|
|
| |
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|
|
|
|
|
| |
Useful for logging
Change-Id: I79fe037abcd74f56c935abc118d706bef0198124
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I78354bf5f0c831108c8f606e50c87cf6bc00d8bd
Change-Id: I58e67c2b38389df874438deada4239510d21654f
|
|
|
|
|
|
|
|
|
| |
Maintenance script populateRevisionSha1.php was using the deprecated
Revision class. Instead, use the new RevisionRecord class if
possible, and custom code otherwise.
Bug: T217829
Change-Id: I0c22286a16d7b243306447d8948428702269a4bd
|
|
|
|
|
|
|
|
|
| |
Per documentation on IDatabase, $conds must be a string or an array.
Passing false for conds is confusing, since it's unclear whether this
should match everything or nothing.
Bug: T188314
Change-Id: I8be1ac4cbdaafc41aadc2a658be8a99b754b0268
|
|
|
|
|
|
|
| |
Maintenance::commitTransaction is calling waitForReplication already.
No need to wait a second time, hopefully the lags are 0 already.
Change-Id: Id457ed2cdd6bfd9663665ba0cd5c4e3dd640b738
|
|
|
|
|
|
|
| |
This helps to find renamed or misspelled classes earlier.
Phan will check the class names
Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
|
|
|
|
|
| |
Bug: T182209
Change-Id: Ic2dbbacdf0a77b8ac531cff8e11be0da8014e083
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I02d89f71d820e4d00a39e86a30397b614bbdb432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several classes have a "selectFields()" static method to tell callers
which fields to select from the database. With the recent comment table
change and the upcoming actor table change, this pattern has become too
simplistic as a SELECT will need to join several tables to be able to
retrieve all the needed fields.
Thus, we deprecate the selectFields() methods in favor of getQueryInfo()
methods that return tables and join conditions in addition to the
fields.
Change-Id: Idcfd15568489d9f03a7ba4460e96610d33bc4089
|
|
|
|
|
|
|
|
|
| |
With the introduction of CommentStore, selects from various table
require certain joins or column aliases for proper operation. The
upcoming actor table change, and the suggested title table change, will
add more such requirements.
Change-Id: Ic8213bff74b8350b15cd271d0ef252e63e7e79bd
|
|
|
|
|
|
|
|
|
| |
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
This includes renaming fixBug20757.php to fixT22757.php for similar consistency.
Change-Id: If81a590d658fbd82c20c54ac47dfdc8856745ca3
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add transaction methods to complement getDB().
This makes it easy to grep for direct begin()/commit()
calls to IDatabase by having script use their own
wrapper. Maintenance scripts are one of the few places
that can (and need to) use begin/commit instead of the
start/end atomic methods.
Eventually, there should be almost no direct callers
and those methods can be made stricter about throwing
errors on nested calls.
Change-Id: Ibbfc7a77c0d2a55f7fc2261087f6c3a19061e0aa
|
|
|
|
| |
Change-Id: I76601a86e30f4984e3b1a8c8ec5ef5a0f652433a
|
|
|
|
| |
Change-Id: I4390c4ea12a6a626b0e6817b6446635116ca9fe3
|
|
|
|
| |
Change-Id: I453ecc474139c7a5f1d0d20306ad28c2cee80ec9
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I727deec35a712de0f0c676cc87dfa661f1ee965b
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 fixed some spacing while at it
Added some braces for one line statements
Change-Id: Iebfa2b17091509daabc76248121c7763e2295d20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows update.php to be run when $wgAllowSchemaUpdates = false.
This is useful for non-WMF environments where strict DB permissions
allow database updates (which update.php performs), but no schema
changes (such as adding or dropping tables or indices which update.php
also performs).
It does this by adding the --schema and --noschema flags. Without
either of these flags, update.php will perform exactly as before.
With --noschema, all changes to the table structure or table additions
are skipped. Only data changes are made.
With --schema is used, no schema changes are made to the database, but
the schema changes are saved to a separate SQL file that can be run.
Change-Id: I96b4cfd4c02e9cbf46cc6a0499b87fb3b89020a0
|
|
|
|
| |
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
|
|
|
| |
This reverts commit 67bfdc7a68940d901e585eadd984a2074bf0216a
|
|
|
|
| |
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
|
|
|
|
| |
Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711
|
| |
|
|
|
|
|
| |
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"
This reverts commit ee0d3d330f76b97c451c168dc9b052ee84609b5b
|
|
|
|
|
|
| |
help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
|
|
|
|
| |
Change-Id: I795dce37bcf4a24d5922d2d5166bf27ba9b77607
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib5cfae54b12fd2fee5120d7dbae7a1e2b99b0181
|
|/
|
|
| |
Change-Id: I070413a736211017022c7ae36a9efab3aa0e1fe1
|
|
|
|
|
|
|
|
|
| |
so it can be added to the count of archive rows
Don't return true in doSha1Updates(), return 0 if table is empty
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/113169
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/112339
|
|
|
|
|
|
|
| |
condition. The $idCol var was misleading as obviously ar_timestamp is not unique.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111920
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111881
|
|
|
|
|
|
|
| |
stored directly in the archive table (not text table)'
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111795
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111445
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/101021
|