jenkins-bot has submitted this change and it was merged.
Change subject: Replace existing WikiGrok questions
......................................................................
Replace existing WikiGrok questions
Existing questions will also be filtered in the LinksUpdate handler, so use
Database#replace rather than #insert with an IGNORE flag in QuestionStore#store.
Bug: T94445
Change-Id: I425a8f746c3f25501a14f08170bf4e87b44c4c65
---
M includes/QuestionStore.php
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Kaldari: Looks good to me, approved
Bmansurov: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/QuestionStore.php b/includes/QuestionStore.php
index eb4d416..a36309f 100644
--- a/includes/QuestionStore.php
+++ b/includes/QuestionStore.php
@@ -58,7 +58,14 @@
);
}
if ( $rows ) {
- $dbw->insert( 'wikigrok_questions', $rows, __METHOD__,
array( 'IGNORE' ) );
+ $dbw->replace(
+ 'wikigrok_questions',
+ array(
+ array( 'wgq_page', 'wgq_campaign',
'wgq_version' ),
+ ),
+ $rows,
+ __METHOD__
+ );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/203345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I425a8f746c3f25501a14f08170bf4e87b44c4c65
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: Kaldari2 <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits