From: Kunal Mehta Date: Thu, 7 Sep 2017 00:08:29 +0000 (-0700) Subject: ContribsPager: Batch page existence lookup for IP range contributions X-Git-Tag: 1.31.0-rc.0~2190^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=c994e92d993764439b20bc6c330c1c2e4522d4ea ContribsPager: Batch page existence lookup for IP range contributions When looking up contributions for a range of IP addresses, include the IP's talk page in page existence lookup batch so it doesn't get looked up individually. Change-Id: I5151c10569a92805f79b59f68f9c57c451dc4597 --- diff --git a/includes/specials/pagers/ContribsPager.php b/includes/specials/pagers/ContribsPager.php index 4296b7816e..31ea810bd9 100644 --- a/includes/specials/pagers/ContribsPager.php +++ b/includes/specials/pagers/ContribsPager.php @@ -394,6 +394,9 @@ class ContribsPager extends RangeChronologicalPager { if ( $this->contribs === 'newbie' ) { // multiple users $batch->add( NS_USER, $row->user_name ); $batch->add( NS_USER_TALK, $row->user_name ); + } elseif ( $this->isQueryableRange( $this->target ) ) { + // If this is an IP range, batch the IP's talk page + $batch->add( NS_USER_TALK, $row->rev_user_text ); } $batch->add( $row->page_namespace, $row->page_title ); }