From: WMDE-Fisch Date: Wed, 28 Jun 2017 07:15:46 +0000 (+0200) Subject: Add tracking for resolved conflicts X-Git-Tag: 1.31.0-rc.0~2783^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=f50cb9abaeaa5fd964b3d155624c3803093fb677;p=lhc%2Fweb%2Fwiklou.git Add tracking for resolved conflicts Bug: T167863 Change-Id: I48bbfc7216d1f726dbcec3ae337466bbf8b2a486 --- 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 );