aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/refreshExternallinksIndex.php
Commit message (Collapse)AuthorAgeFilesLines
* Schema: Drop old externallinks columns and indexesAmir Sarabadani2023-09-051-124/+0
| | | | | | | | | | Already dropped from production Also dropping FixExtLinksProtocolRelative as it's not useful anymore and it has been run in previous releases so it's not worth fixing. Bug: T312666 Change-Id: I1dd6e704b34e685ada6e316da11243d10827d769
* Reorg: Move LinkFilter to ExternalLinksAmir Sarabadani2023-03-011-0/+2
| | | | | | | | | | | | It's one-class namespace and I know it's not great but: - I hope to add more classes with the redesign of externallinks table - It's not named very well either, it's a collection of URL-related functionalities - Making it clear LinkFilter is about external links, not internal or interwiki or templatelinks etc. Bug: T321882 Change-Id: I0dd530237f45e4fec786178ec03ee941c6bcd982
* Clean up old ICU version checksKevin Israel2023-01-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since 1.36, intl has been a required PHP extension, and PHP 7.4 dropped support for ICU < 50.1 (Unicode 6.2), so: * In SpecialVersion, don't check whether INTL_ICU_VERSION is defined. * Remove check in the installer for outdated Unicode normalization. It was added over twelve years ago in r70126 (a21fb8651f20f1ef) with a comment that it should be kept up to date, but no one ever did. * Remove IcuCollation::getUnicodeVersionForICU(), which contained a long list of ICU versions and corresponding Unicode versions that had to be kept up to date manually. Instead use IntlChar::getUnicodeVersion(), which was added in PHP 7.0. There are no known callers outside core. * Remove LinkFilter::supportsIDN(), as ICU has had support for UTS#46 since version 4.6. There are no known callers outside core. Also remove $flags and $variant from the idn_to_utf8() call, which match PHP 7.4's defaults. (INTL_IDNA_VARIANT_2003 was the default in 7.3.) * Display the ICU and Unicode versions in the installer, just below the PHP version. The ICU version is shown on Special:Version near the PHP version, and it probably makes sense to show it there as well. Change-Id: Ibdfac1a6f46fd56b84de1140292e0ec863f043ee
* Merge "maintenance: Use $this->waitForReplication()"jenkins-bot2022-10-271-4/+1
|\
| * 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
* | Externallinks: Add ability to write to the new fieldsAmir Sarabadani2022-10-251-4/+8
|/ | | | | | | | | This only supports WRITE_BOTH for now, the rest will be implemented. Tested locally, works fine. Bug: T318606 Change-Id: I6f898aa89f7d36f3f8a4eb8c23706c64a90896b0
* RefreshExternallinksIndex: Add trailing . to skipped messageReedy2022-04-071-1/+1
| | | | Change-Id: I8e30a585fd72e1d9743213c3e33a282a6298f561
* 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
* Add some int casts for queries in maintenance scriptsUmherirrender2020-11-271-1/+1
| | | | | | | | all places detected as SecurityCheck-SQLInjection by mediawiki/phan-taint-check-plugin 3.1.0 Bug: T216348 Change-Id: Ifd9589e8da996a0017b4361c62830e597c41f10e
* Pass function name to database functions (maintenance scripts)Umherirrender2020-06-071-1/+1
| | | | | | Useful for logging Change-Id: I79fe037abcd74f56c935abc118d706bef0198124
* Replace wfWaitForSlaves() with LBFactory::waitForReplication()Reedy2020-05-021-1/+4
| | | | Change-Id: I337147d61e2ec686a8672d0340dff4b6783f78cd
* Use class keyword for classname resolutionAmmar Abdulhamid2020-03-271-1/+1
| | | | Change-Id: I149abf837c6bd79f05648b1acbfaf45dc900125e
* Use new externallinks.el_index_60 fieldBrad Jorsch2018-11-121-0/+120
This adds a method to LinkFilter to build the query conditions necessary to properly use it, and adjusts code to use it. This also takes the opportunity to clean up the calculation of el_index: IPs are handled more sensibly and IDNs are canonicalized. Also weird edge cases for invalid hosts like "http://.example.com" and corresponding searches like "http://*..example.com" are now handled more regularly instead of being treated as if the extra dot were omitted, while explicit specification of the DNS root like "http://example.com./" is canonicalized to the usual implicit specification. Note that this patch will break link searches for links where the host is an IP or IDN until refreshExternallinksIndex.php is run. Bug: T59176 Bug: T130482 Change-Id: I84d224ef23de22dfe179009ec3a11fd0e4b5f56d