aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/exportSites.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace remaining files in includes/siteJames D. Forrester2023-12-141-0/+2
| | | | | Bug: T353458 Change-Id: I38da09f28cd68add721ba7b05f351acb56515d95
* maintenance: Begin using `Maintenance::getServiceContainer()`Derick Alangi2023-09-041-1/+1
| | | | | | | | | | | 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
* (import|export)Sites.php: Move parent::__construct call above addDescriptionAlexander Vorwerk2022-07-311-2/+2
| | | | | Bug: T314258 Change-Id: Ie0cfbe719d3d2b743f3ef629fb3062c06a39beb1
* Safer autoloading with respect to file-scope codeTim Starling2021-01-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many files were in the autoloader despite having potentially harmful file-scope code. * Exclude all CommandLineInc maintenance scripts from the autoloader. * Introduce "NO_AUTOLOAD" tag which excludes the file containing it from the autoloader. Use it on CommandLineInc.php and a few suspicious-looking files without classes in case they are refactored to add classes in the future. * Add a test which parses all non-PSR4 class files and confirms that they do not contain dangerous file-scope code. It's slow (15s) but its results were enlightening. * Several maintenance scripts define constants in the file scope, intending to modify the behaviour of MediaWiki. Either move the define() to a later setup function, or protect with NO_AUTOLOAD. * Use require_once consistently with Maintenance.php and doMaintenance.php, per the original convention which is supposed to allow one maintenance script to use the class of another maintenance script. Using require breaks autoloading of these maintenance class files. * When Maintenance.php is included, check if MediaWiki has already started, and if so, return early. Revert the fix for T250003 which is incompatible with this safety measure. Hopefully it was superseded by splitting out the class file. * In runScript.php add a redundant PHP_SAPI check since it does some things in file-scope code before any other check will be run. * Change the if(false) class_alias(...) to something more hackish and more compatible with the new test. * Some site-related scripts found Maintenance.php in a non-standard way. Use the standard way. * fileOpPerfTest.php called error_reporting(). Probably debugging code left in; removed. * Moved mediawiki.compress.7z registration from the class file to the caller. Change-Id: I1b1be90343a5ab678df6f1b1bdd03319dcf6537f
* Miscellaneous documentation updatesDannyS7122020-02-161-1/+1
| | | | | | | Update references from .txt to .md when files have moved, a few other tweaks, no changes to code. Change-Id: I0bfd38c47b9fb0fc11ae98a0a674af66fb4c5a84
* Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errorsKunal Mehta2018-05-231-1/+1
| | | | Change-Id: I936c3f5fca1a0061f215e80469f5d882cb32ee29
* build: Updating mediawiki/mediawiki-codesniffer to 17.0.0Umherirrender2018-03-291-1/+1
| | | | Change-Id: Ib494b47c54fe6354d166055b1e1b31d3583bb992
* Use ::class to resolve class names in maintenance scriptsUmherirrender2018-01-231-1/+1
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
* Maintenance: add fatalError() methodBryan Davis2017-11-211-1/+1
| | | | | | | | 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
* Introduce top level service locator.daniel2016-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The service locator, MediaWikiServices, is intended to facilitate "manual" dependency injection in static entry points. See also the Dependency Injection RFC T384 and Service Locator RFC T124792 for details. The following key points were implemented according the discussion surrounding these RFCs: * a configurable DI container that allows extensions to add and replace services. * no auto-wiring, since it's prone to add confusion in large and complex applications. * no 3rd party framework, since they typically do too much. The following services in MediaWiki core are made accessible via the service locator mechanism to showcase the bootstrapping mechanism: * ConfigFactory and MainConfig * SiteLookup and SiteStore However, the implementation of these services was not yet converted to using proper DI throughout the code. Bug: T124792 Change-Id: I3c25c0ac17300d3dd13e1cf5100558a605eee15f
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-301-1/+1
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* maintenance/exportSites: Fix minor whitespace issueVivek Ghaisas2015-06-201-1/+1
| | | | | | Opening parentheses should be followed by a single space. Change-Id: I9d73334c3c79bf5277248c56e0f146a91938b35c
* Fix phpcs warningspaladox2015-06-181-1/+3
| | | | | Bug: T102614 Change-Id: Iecea365f83bbb0c336b58f1cfdebfc9b1112087e
* Fixed spacingumherirrender2015-06-171-2/+2
| | | | | | | | | | | | | | | | - Removed space after casts - Removed spaces in array index - Added spaces around string concat - Added space after words: switch, foreach - else if -> elseif - Removed parentheses around require_once, because it is not a function - Added newline at end of file - Removed double spaces - Added spaces around operations - Removed repeated newlines Bug: T102609 Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
* Maintenance script for exporting site definitionsdaniel2015-02-201-0/+54
Bug: T87178 Change-Id: I40fd6aaa8f47bad3d595d5c190036bf04d13c12a