diff options
author | Brad Jorsch <bjorsch@wikimedia.org> | 2016-11-18 19:50:43 -0500 |
---|---|---|
committer | Tim Starling <tstarling@wikimedia.org> | 2018-11-12 22:33:18 +0000 |
commit | d65e96b7638279f7884dec827b75096bd8f2683a (patch) | |
tree | 70cdc325efb6544faa3d6c2da2d075a5d37b2dbc /includes/deferred | |
parent | d4e88508689aebfc9653f3a260428458e6fe15ad (diff) | |
download | mediawikicore-d65e96b7638279f7884dec827b75096bd8f2683a.tar.gz mediawikicore-d65e96b7638279f7884dec827b75096bd8f2683a.zip |
Use new externallinks.el_index_60 field
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
Diffstat (limited to 'includes/deferred')
-rw-r--r-- | includes/deferred/LinksUpdate.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 577a272000b5..b4863f86c803 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -567,7 +567,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate { $arr = []; $diffs = array_diff_key( $this->mExternals, $existing ); foreach ( $diffs as $url => $dummy ) { - foreach ( wfMakeUrlIndexes( $url ) as $index ) { + foreach ( LinkFilter::makeIndexes( $url ) as $index ) { $arr[] = [ 'el_from' => $this->mId, 'el_to' => $url, |