| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T378203
Change-Id: Id846cb26406b6de9d9062c9516aa60b0e16a88da
|
|
|
|
| |
Change-Id: I53f2e32c73c92cc3a0deee48ebe6d13329a7a0cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow Maintenance::error() and Maintenance::fatalError() to take
StatusValue objects. They now print each error message from the
status on a separate line, in English, ignoring on-wiki message
overrides, as wikitext but after parser function expansion.
Thoughts on the previously commonly used methods:
- $status->getMessage( false, false, 'en' )->text()
Almost the same as the new output, but it allows on-wiki message
overrides, and if there is more than one error, it prefixes each
line with a '*' (like a wikitext list).
- $status->getMessage( false, false, 'en' )->plain()
- $status->getWikiText( false, false, 'en' )
As above, but these forms do not expand parser functions
such as {{GENDER:}}.
- print_r( $status->getErrorsArray(), true )
- print_r( $status->getErrors(), true )
These forms output the message keys instead of the message text,
which is not very human-readable.
The error messages are now always printed using error() rather
than output(), which means they go to STDERR rather than STDOUT
and they're printed even with the --quiet flag.
Change-Id: I5b8e7c7ed2a896a1029f58857a478d3f1b4b0589
|
|
|
|
| |
Change-Id: Ie8f650eb03186feb7f69e7c71ef121c0d26404f5
|
|
|
|
|
|
|
|
| |
Also remove print_r with a string
Always use english for maintenance scripts
Bug: T229843
Change-Id: I539a1ac1f6a201dd8ee9ce89599cc34bebfba79f
|
|
|
|
|
|
|
|
| |
* User::changeAuthenticationData does not throw PasswordError
* passwords are not stored in User so there's no point in saving it
Bug: T219689
Change-Id: I2cef889523903fb8c5f091f63482970ea212446c
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I2b2c9693a275fcc026916bd97f303e7a5c8df341
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also update createAndPromote.php to use it so it can display errors.
Note that there are two possible approaches. The other is to
do the update for all requests for which the test passed,
even if some tests fail. The approach of the patch seems
more manageable from the caller's point of view
(either the operation was a success, or it failed and
nothing happened).
Change-Id: I86abed4b80472cd888337444fac0cbcb870b1246
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix up spaces in our function calls, we do not want spaces before a
comma and try to avoid multiple commas whenever possible.
Errors:
* No space found after comma in function call
* Space found before comma in function call
Change-Id: I51aec02016f742422fa60b92ad35ba3f0ef59ba3
|
|
|
|
|
|
| |
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: I328a3d42a09f2b082ebc153c2f399793e23942d7
|
|
|
|
|
|
|
| |
submitted by Søren Løvborg, checking for null return values from User::newFromName()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103745
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96733
|
|
|
|
|
|
|
| |
Should help (maybe fix?) Bug 30850 - maintenance/changePassword.php does not purge (APC) cache
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96732
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/84857
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* added @file where needed
* replaced @copyright and @license with GPL header and copyright notice
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/72159
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/66751
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/55830
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/55818
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/46685
|
|
|
|
|
|
|
|
|
| |
* Made the PasswordReset and Maintenance extensions, and maintenance/changePassword.php work with CentralAuth, by calling User::setPassword() instead of updating the database directly. They work now even if you use an object cache.
* Don't automatically log in as the user in question when CentralAuthUser::setPassword() is called, it's kind of uncool when an administrator is setting the password of another user.
* Fix bug 14330 by setting the local passwords on demerge
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35923
|
|
|
|
|
|
|
|
|
| |
getId() and setId()
This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35186
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/22203
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"
For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.
Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/19598
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/19502
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/13184
|
|
|
|
|
|
|
| |
to the shell to return nonzero when we crap out with an error.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/12660
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/12476
|
|
|
|
|
|
|
|
| |
print an ugly warning message when hit in a web browser.
(Path disclosure issue with display_errors on.)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/11734
|
|
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/11733
|