aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/removeInvalidEmails.php
Commit message (Collapse)AuthorAgeFilesLines
* add `use MediaWiki\Maintenance\Maintenance` to some maintenance classesNovem Linguae2024-12-051-0/+1
| | | | | | | | | this patch changes P–Z. still need to do subfolders in one file, I also deleted an errant line break that was disconnecting the class docblock from the class. Change-Id: I3b60c2a5817f12c47490e78e36cc18bfeeb98af9
* maintenance: Add missing documentation to class propertiesUmherirrender2024-09-131-0/+1
| | | | | | | | | | Add doc-typehints to class properties found by the PropertyDocumentation sniff to improve the documentation. Once the sniff is enabled it avoids that new code is missing type declarations. This is focused on documentation and does not change code. Change-Id: I7dec01892a987a87b1b79374a1c28f97d055e8fa
* Exclude boilerplate maintenance code from code coverage reportsDreamy Jazz2024-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* maintenance: Migrate to IDatabase::newUpdateQueryBuilderUmherirrender2024-04-141-6/+6
| | | | | Bug: T353219 Change-Id: Ic278c8534dad40a3f34674db2d5fbfbca5984da8
* maintenance: Introduce getReplicaDB() and getPrimaryDB()Amir Sarabadani2024-01-181-2/+2
| | | | | | | | | | | | 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
* maintenance: Migrate to expression buildersAmir Sarabadani2024-01-171-2/+2
| | | | | | | This was somehow left out Bug: T210206 Change-Id: I70851b5b99fa865dbfd629caf2c1866c85418350
* Namespace Sanitizer under \MediaWiki\ParserJames D. Forrester2023-09-211-0/+1
| | | | | Bug: T166010 Change-Id: Id13dcbf7a0372017495958dbc4f601f40c122508
* Namespace User under \MediaWiki\UserJames D. Forrester2023-09-191-0/+2
| | | | | Bug: T166010 Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
* Simplify WHERE conditions with field IS NULLUmherirrender2023-07-241-1/+1
| | | | | | Reduce raw sql fragments on simple compares Change-Id: I3f2340dfdbf5197cc22546911e6c5653dc5a6269
* maintenance: Switch simple calls of Database::select to SQBAmir Sarabadani2023-07-191-8/+7
| | | | | | | Done semi-automatically via a php parser written on top of ANTLR4. Bug: T311866 Change-Id: I33f5b6703c0aa9c80c907a21c2a770e30642edd3
* maintenance: Use $this->waitForReplication()Amir Sarabadani2022-10-241-4/+1
| | | | | | | This adds reconfiguring db pools in case a replica gets depooled Bug: T298485 Change-Id: Id052ce8ed45c51e51b071778858d27b48605bf93
* RemoveInvalidEmails: Fix quoting for postgresUmherirrender2022-07-091-1/+1
| | | | | | | Use addQuotes to quote the empty string instead of hard-coding "", which not working in postgres Change-Id: I52b79b5baf92cf50cf6edad227bcfa1abaa88aea
* Replace uses of DB_MASTER with DB_PRIMARYJames D. Forrester2021-04-291-1/+1
| | | | | | Just an auto-replace from codesniffer for now. Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
* Replace wfWaitForSlaves() with LBFactory::waitForReplication()Reedy2020-05-021-1/+4
| | | | Change-Id: I337147d61e2ec686a8672d0340dff4b6783f78cd
* Remove "Squiz.WhiteSpace.FunctionSpacing" from phpcs exclusionsReedy2019-05-111-0/+1
| | | | Change-Id: I78b3315f26ab91b6b443f5b028a635552f82f5a3
* 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
* Introduce Maintenance::getBatchSize()Max Semenik2017-11-051-1/+1
| | | | | | Just to isolate the internals. Fix most of usages in the core. Change-Id: I8b3e9ca1f42b7c49ee57f17b88ca2fc7b404f342
* Rename DB_SLAVE constant to DB_REPLICAAaron Schulz2016-09-051-1/+1
| | | | | | | | | 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
* Convert all array() syntax to []Kunal Mehta2016-02-171-7/+7
| | | | | | | | | | 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
* removeInvalidEmails.php: Fix batching continuation for wikis with >500 usersKunal Mehta2014-12-041-3/+3
| | | | Change-Id: I6343aa204ddd68e9685630b67ac0b0ca535b426b
* Add removeInvalidEmails.php maintenance scriptKunal Mehta2014-12-031-0/+78
The script scans the user table and removes emails that are technically invalid which don't pass Sanitizer::validateEmail(), and wouldn't be allowed today. Confirmed emails are skipped entirely since they had to be valid at some point. Bug: T76512 Change-Id: I3cc6396ff6d8b738846b7716b4b0cddc9bf9e1a4