| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
F–P. Still need to do P–Z.
there's a couple spots where I added `use
MediaWiki\Maintenance\LoggedUpdateMaintenance;` or similar instead.
some of the existing "use" blocks were in weird spots (e.g. above the copyright
docblock, or too far down). i didn't move those because they are out of scope
for this patch.
Change-Id: I5b6a8f3eae5be85d67bccfcce31c0c2027850f45
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Creates two metrics, one emitting milliseconds for
backwards-compatibility and another emitting seconds, aligned with
Prometheus' upstream recommendations.
Update test.
Bug: T359382
Change-Id: Id5a22937b60a209b6ba46633879551d24cf93a45
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When replication is broken to a host, its lag is returned as `false`
which was converted to an integer and thus yielding 0. That hides the
fact the replication is broken, specially when all other replicating
hosts have sub second lag.
Give a meaningful message when replication is broken, same as we did for
lag.php in Ibc88d2b86384a68b3cf6fe0d9739144247534821.
Bug: T358484
Change-Id: I321516cf054f23940e0f0944832b57a387434721
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Ie3726b27f376cff17cffda4844300cbcba0ae94c
|
|
|
|
| |
Change-Id: I047e099a93203a59093946d336a143d899d0271f
|
|
|
|
|
|
|
| |
This helps to find renamed or misspelled classes earlier.
Phan will check the class names
Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
|
|
|
|
|
|
|
|
| |
Previously, this sent the floating point value in seconds,
which is not what statsd expects here.
Bug: T149210
Change-Id: I8fcd58d7c9e183952df1257b1520d9426a42fd26
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The script now lists all DBs in the LBFactory,
not just those of the current wiki cluster.
* Add a --report option to send the metrics
to statsD so that the MediaWiki view of lag can
be measured, rather than just the DB-level view.
This avoids some noise with depooled servers.
Bug: T149210
Change-Id: I6eae25e29aecf21251ad0eec53c56a86f35007f5
|
|
|
|
| |
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: I9657f72996358f8c1c154cea1ea97970d973723c
|
|
|
|
|
|
| |
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
|
|
|
|
| |
Change-Id: If0af9922ede902c2c6f18b627d5810f3e888c944
|
|
|
|
|
|
|
|
|
|
|
| |
maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself.
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().
Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/80205
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/77711
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/66751
|
|
|
|
|
|
|
| |
commandLine.inc/Maintenance.php using the full path every time.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/54312
|
|
|
|
|
|
|
| |
Still have to use on output(), because people like "Something...done" stuff.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/54240
|
|
|
|
|
|
|
|
|
|
|
| |
* Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files.
* (bug 11867) Lock error on redirect table when running orphans.php
* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params
* (bug 18566) Maintenance script to un/protect pages
* initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/54225
|
|
|
|
|
|
|
|
| |
Seems to have broken a bunch of stuff. Don't commit giant non-critical changes that break Setup.php and all maint scripts. Thanks!
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/52340
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (bug 16322) Allow maint scripts to accept DB user/pass over input or params if no AdminSettings.php
* (bug 18768) Remove AdminSettings.php from MediaWiki core
* (bug 19157) createAndPromote error on bad password
* (bug 14201) Create AdminSettings.php during wiki installation, in the same way as LocalSettings.php
* Introduce new Maintenance class framework and port a good number of scripts over; the ones that are left are a little more complicated. Read the docs.
* Not deleting "unused" files yet, don't want to break everything at once :)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/52336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB.
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system.
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete.
* Removed the useless force() function.
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features.
* Removed ancient benet-specific hack from waitForSlave.php
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/32578
|
|
|
|
|
|
|
| |
mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/23531
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* use configured cache servers for mctest.php
* bucket details in mcc.php
* fix input validation and remove debugging code in compressOld
* full ID range for moveToExternal
* fix resolveStubs.php for compatibility with older serialized data
* maximum line length for bar graphs in getLagTimes.php
* recognize specieswiki in rebuildInterwiki.inc
* --purge option to do additional parser-cache purging for purgeList.php
* default changed in MiniDonation extension
* profile unicode cleanup in Xml
* log slow parses in Article.php
* profile wfMsgReal
* log mkdir failures
* profile AutoLoader
* rebuild empty DjVu metadata containing ''
* security fix for DjVu metadata retrieval
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/19364
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/18171
|
|
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/18170
|