aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/storage
Commit message (Collapse)AuthorAgeFilesLines
...
| * Replace wfGetLBFactoryUmherirrender2018-02-273-3/+9
| | | | | | | | | | | | @deprecated since 1.27 Change-Id: I11a7253cebe525948a55cebee183e6de128fdc39
* | Pass '' instead of false for the $conds parameter in select calls.daniel2018-03-027-9/+9
|/ | | | | | | | | 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
* Remove wfWaitForSlaves when using Maintenance::commitTransactionUmherirrender2018-02-262-11/+0
| | | | | | | Maintenance::commitTransaction is calling waitForReplication already. No need to wait a second time, hopefully the lags are 0 already. Change-Id: Id457ed2cdd6bfd9663665ba0cd5c4e3dd640b738
* Update suppressWarning()/restoreWarning() callsReedy2018-02-102-4/+4
| | | | | Bug: T182273 Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
* Use ::class to resolve class names in maintenance scriptsUmherirrender2018-01-237-8/+8
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
* build: Updating mediawiki/mediawiki-codesniffer to 15.0.0Umherirrender2018-01-011-2/+1
| | | | | | | | | | | | | Clean up use of @codingStandardsIgnore - @codingStandardsIgnoreFile -> phpcs:ignoreFile - @codingStandardsIgnoreLine -> phpcs:ignore - @codingStandardsIgnoreStart -> phpcs:disable - @codingStandardsIgnoreEnd -> phpcs:enable For phpcs:disable always the necessary sniffs are provided. Some start/end pairs are changed to line ignore Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
* [WikiImporter::notice] use wfDebug instead of echo in notice()Yifei He2017-12-221-0/+3
| | | | | | | | Make the default notice implementation of notice() function to send the notice to wfDebug() instead of simply echo to prevent XSS Bug: T177997 Change-Id: I9ffb597e0642afc1603cdd15e2d09c6f2584b448
* Fix manual IN queries in checkStorage.phpPppery2017-12-131-2/+6
| | | | | Bug: T182689 Change-Id: Ifca7bd6d0385dd470cddc483f4641eeb2832580c
* maintenance: Replace manual IN query with select wrapperYifei He2017-12-121-6/+14
| | | | | Bug: T182208 Change-Id: I4c410bc1f7a57efacda4ac71a074a8a8ee2d1d98
* Maintenance: add fatalError() methodBryan Davis2017-11-214-22/+28
| | | | | | | | 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
* Replace selectFields() methods with getQueryInfo()Brad Jorsch2017-10-301-9/+7
| | | | | | | | | | | | | | 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
* Replace more uses of "SELECT *"Brad Jorsch2017-10-131-1/+5
| | | | | | | | | 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
* Move DB errors to Rdbms namespaceAaron Schulz2017-04-151-0/+2
| | | | Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
* maintenance: Replace implicit Bugzilla bug numbers with Phab onesJames D. Forrester2017-02-212-7/+7
| | | | | | | | | 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
* Remove empty lines from PHP and JavaScript comment blocksThiemo Mättig2016-12-091-2/+0
| | | | | | | | | This is a pure documentation change. It mostly removes empty lines from comments (and entirely empty comments), as well as adds a few missing documentation blocks and fixes a minor mistake. I hope it's ok to have this in one patch. I can split it, please tell me. Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4
* Get ConfigFactory & MainConfig from MediaWikiServicesaddshore2016-11-231-1/+3
| | | | Change-Id: Iafdd7e00747060572463ffb05aae4543f3a06163
* Replace DatabaseBase => Database in more placesAaron Schulz2016-09-281-1/+1
| | | | Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517
* Clean up array() syntax in docs, part VIIAmir Sarabadani2016-09-271-1/+1
| | | | | | Last part Change-Id: I38f015e2122ef4fd2d2141718bd889794c29f06c
* More replication var cleanups in /maintenanceAaron Schulz2016-09-051-33/+37
| | | | | | | | * Fix option check in sql.php * Rename RecompressTracked vars and avoid deprecated method calls Change-Id: Ie04f6e841d68d69c9243a185de1bd13a612b2070
* Rename DB_SLAVE constant to DB_REPLICAAaron Schulz2016-09-0511-26/+26
| | | | | | | | | This is more consistent with LoadBalancer, modern, and inclusive of master/master mysql, NDB cluster, and MariaDB galera cluster. The old constant is an alias now. Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
* Change "slave" => "replica DB" in /maintenanceAaron Schulz2016-09-062-10/+10
| | | | Change-Id: Ibd3d617901130378a935402326cd4eefbb382c9e
* Remove checks formerly for MySQL server versionKevin Israel2016-08-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Removed these checks instead of fixing them, for the stated reasons: * initEditCount.php: "instanceof DatabaseMysql" is not a correct way to check if the database server is MySQL/MariaDB, because DatabaseMysql is now a subclass of DatabaseMysqlBase, only used as a wrapper around the deprecated mysql PHP extension (not the newer mysqli extension). The check was intended for pre-4.1 versions of MySQL, which do not support subqueries. The effect of this change is to use single-query mode whenever there is only one configured database server, even when using the mysqli PHP extension, which would have been the original intent. * fixBug20757.php: If the database server is not MySQL/MariaDB, the $lowerLeft variable would remain undefined. The script was only intended for use with MySQL, so the check was only necessary in order to support pre-4.1 versions of MySQL, which require different SQL. Follows-up b74f88967bf090af. Change-Id: I7f32aed4473e5ea39dc40449ddc0af5f9a10df16
* RecompressTracked: Remove useless member variableChad Horohoe2016-05-181-3/+3
| | | | | | It's only checked once and has no external users Change-Id: I6951b799759f1d8b0063a3059bec5c1c64a35815
* Many more function case mismatchesReedy2016-03-191-1/+1
| | | | Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
* Try to fix some other broken-looking legacy maintenance script optionsAlex Monk2016-03-122-0/+2
| | | | | Bug: T125748 Change-Id: I2004d9b1fd7389623a3f2da6682f9007efd679dc
* maintenance: Remove odd use of $wgLangTimo Tijhof2016-03-031-2/+3
| | | | | | | | | | | | * testCompression.php: Called $wgLang, but didn't set it. It just assumed it was English. Use a local variable instead. * update.php: Set $wgLang to English. Set main RequestContext as well. * transstat.php: Rename $wgLanguages to $languages for less confusion. It's just a local instance of language.inc's Languages class. Change-Id: I67865f4d8710946001f7586ab0a17e125366b184
* Convert all array() syntax to []Kunal Mehta2016-02-1711-223/+223
| | | | | | | | | | 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
* Fix a bunch of call-time pass-by-reference errorsMax Semenik2016-02-101-1/+1
| | | | Change-Id: I3bd8e7c4d2dca465957a353cb7dc2a906699ff6a
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-303-4/+4
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* Update wfGetDB calls in Maintenance scripts to use getDB()Reedy2016-01-026-11/+11
| | | | Change-Id: I9ad6745d84506b736dae94747256caac89715899
* Fix numerious errors in RecompressTrackedAaron Schulz2015-12-301-11/+15
| | | | | | | * Fix method calls to wrong classes * Cleanup IDEA errors in static analysis Change-Id: Ibd0fdb52db884abefb149f5340a4a4b5dad2c89b
* Clean up transactions in maintenance scriptsAaron Schulz2015-12-303-8/+8
| | | | | | | | | | | | | | | 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
* Remove various double empty newlinesumherirrender2015-12-271-1/+0
| | | | | | | The double empty newline is not needed between functions, variable or at end of file Change-Id: Ib866a95084c4601ac150a2b402cfa184ebc18afa
* Change some line comments to multi line commentsumherirrender2015-10-141-7/+8
| | | | | | | This allows empty lines inside the comment as found by the MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment sniff Change-Id: Iac155bbda4a84562db2b452baeae9b8973899453
* Modernized slave wait checks in recompressTracked.phpAaron Schulz2015-10-021-19/+5
| | | | Change-Id: I5771af8135530677dc8223389f572896918c6b72
* Fix issues identified by SpaceBeforeSingleLineComment sniffVivek Ghaisas2015-09-261-4/+4
| | | | Change-Id: I048ccb1fa260e4b7152ca5f09b053defdd72d8f9
* Use mediawiki/at-ease library for suppressing warningsKunal Mehta2015-06-112-4/+4
| | | | | | | | | | | | | | | wfSuppressWarnings() and wfRestoreWarnings() were split out into a separate library. All usages in core were replaced with the new functions, and the wf* global functions are marked as deprecated. Additionally, some uses of @ were replaced due to composer's autoloader being loaded even earlier. Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to mediawiki/vendor. Bug: T100923 Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
* Move MWLogger classes to MediaWiki\Logger namespaceBryan Davis2015-04-031-1/+3
| | | | | | | | | Move the MWLogger PSR-3 logging related classes into the MediaWiki\Logger namespace. Create shim classes to ease migration of existing MWLoggerFactory usage to the namespaced classes. Bug: T93406 Change-Id: I359cc81fbd2dcf8937742311dcc7d3dee08747b0
* Documentation of compressOld.phpayush_garg2015-02-061-3/+13
| | | | Change-Id: Ib6e4914379568bfae32007f6e76968791798b08f
* Merge "Remove explicit require of ExternalStoreDB.php"jenkins-bot2015-02-031-1/+0
|\
| * Remove explicit require of ExternalStoreDB.phpReedy2015-02-031-1/+0
| | | | | | | | | | | | AutoLoader should take care of this. Change-Id: Iabe335cd14e2739df9c184d6ab2e6ee98205b550
* | Remove unused REPORTING_INTERVAL from resolveStubs.phpReedy2015-02-031-2/+0
|/ | | | | | It causes a notice when moveToExternal.php is run Change-Id: I50429742f87ab13a5428cbc282c2ce7eda37f714
* Deprecate wfErrorLogBryan Davis2014-12-151-1/+1
| | | | | | | When a logging service other than MWLoggerLegacySpi is used, the behavior of wfErrorLog is not guaranteed. Change-Id: I8543bfd556aa752665f7a3daa855d3c2f7fc8956
* Fix case of various newFromID/newFromId functionsumherirrender2014-12-101-1/+1
| | | | | | | | | | | | User::newFromID -> User::newFromId Revision::newFromID -> Revision::newFromId RecentChange::newFromID -> RecentChange::newFromId WikiPage::newFromId -> WikiPage::newFromID Title::newFromId -> Title::newFromID Change-Id: I310f26653613951e9b21ce915a92d205a87937f1
* Merge "Import.php: Use Config instead of globals"jenkins-bot2014-10-301-1/+5
|\
| * Import.php: Use Config instead of globalsKunal Mehta2014-10-221-1/+5
| | | | | | | | Change-Id: I4d1a8c443cfa360c5d388364c580d48fa7124099
* | chmod 755 bash & Perl files, chmod 644 .css fileSouthparkfan2014-10-301-0/+0
|/ | | | | Bug: 71972 Change-Id: I16d6ffde113838fc431bffaf00be1574d5a0303a
* Add missing @param to function docsumherirrender2014-08-183-1/+15
| | | | Change-Id: Ib26407bc55dff7969d8a3b1e2ae51751b202d8fb
* Update formatting in maintenance/ (4/4)Siebrand Mazeland2014-04-236-15/+35
| | | | Change-Id: I6b58d014a4bfd6600e4e6f80188fdcfce18482ca
* Pass phpcs-strict on maintenance/storage/Siebrand Mazeland2014-04-227-40/+144
| | | | Change-Id: Ia39b316e01797ddedd71885c2f05fe57ba4b89e9