From f50cb9abaeaa5fd964b3d155624c3803093fb677 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Wed, 28 Jun 2017 09:15:46 +0200 Subject: [PATCH] Add tracking for resolved conflicts Bug: T167863 Change-Id: I48bbfc7216d1f726dbcec3ae337466bbf8b2a486 --- includes/EditPage.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/EditPage.php b/includes/EditPage.php index 6be8771121..814c248304 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1493,6 +1493,20 @@ class EditPage { return $status; } + /** + * Log when a page was successfully saved after the edit conflict view + */ + private function incrementResolvedConflicts() { + global $wgRequest; + + if ( $wgRequest->getText( 'mode' ) !== 'conflict' ) { + return; + } + + $stats = MediaWikiServices::getInstance()->getStatsdDataFactory(); + $stats->increment( 'edit.failures.conflict.resolved' ); + } + /** * Handle status, such as after attempt save * @@ -1512,6 +1526,8 @@ class EditPage { if ( $status->value == self::AS_SUCCESS_UPDATE || $status->value == self::AS_SUCCESS_NEW_ARTICLE ) { + $this->incrementResolvedConflicts(); + $this->didSave = true; if ( !$resultDetails['nullEdit'] ) { $this->setPostEditCookie( $status->value ); -- 2.20.1