jenkins-bot has submitted this change and it was merged.
Change subject: Only set userEditCount if the user is logged in
......................................................................
Only set userEditCount if the user is logged in
If the user is logged out, the editCount will be null which doesn't
conform to the schema which requires an integer for editCount.
Change-Id: I901fd2ca74a4ebf4c630b6d23c77e3bb9c4ad3bd
---
M includes/api/ApiResponse.php
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/ApiResponse.php b/includes/api/ApiResponse.php
index 9ec2fff..202bce7 100644
--- a/includes/api/ApiResponse.php
+++ b/includes/api/ApiResponse.php
@@ -34,7 +34,6 @@
$baseEvent = array(
'pageId' => $params['page_id'],
'userToken' => $params['user_token'],
- 'userEditCount' => $user->getEditCount(),
'taskToken' => $params['task_token'],
'taskType' => $params['task_type'],
'subjectId' => $params['subject_id'],
@@ -43,6 +42,9 @@
'testing' => $params['testing'],
'isLoggedIn' => $user->isLoggedIn(),
);
+ if ( $user->isLoggedIn() ) {
+ $baseEvent['userEditCount'] = $user->getEditCount();
+ }
$eventLogger = $this->getEventLogger();
foreach ( $claims as $claim ) {
--
To view, visit https://gerrit.wikimedia.org/r/174850
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I901fd2ca74a4ebf4c630b6d23c77e3bb9c4ad3bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: wmf/1.25wmf8
Gerrit-Owner: Kaldari <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits