EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/107717
Change subject: Utilize LinkBatch for gender, NS_USER, and NS_USER_TALK lookups
......................................................................
Utilize LinkBatch for gender, NS_USER, and NS_USER_TALK lookups
Change-Id: I55932951a90ea2295a3918f7b45490c4122c2770
---
M includes/Data/UserNameBatch.php
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/17/107717/1
diff --git a/includes/Data/UserNameBatch.php b/includes/Data/UserNameBatch.php
index f0618c6..9bf77d2 100644
--- a/includes/Data/UserNameBatch.php
+++ b/includes/Data/UserNameBatch.php
@@ -133,11 +133,17 @@
unset( $this->queued[$wiki] );
if ( $res ) {
$found = array();
+ $lb = new LinkBatch();
foreach ( $res as $row ) {
$id = (int)$row->user_id;
$this->usernames[$wiki][$id] = $row->user_name;
$found[] = $id;
+ $cleanName = str_replace( ' ', '_',
$row->user_name );
+ $lb->add( NS_USER, $cleanName );
+ $lb->add( NS_USER_TALK, $cleanName );
}
+ $lb->setCaller( __METHOD__ );
+ $lb->execute();
$missing = array_diff( $queued, $found );
} else {
$missing = $queued;
--
To view, visit https://gerrit.wikimedia.org/r/107717
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55932951a90ea2295a3918f7b45490c4122c2770
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits