Daniel Kinzler has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367703 )

Change subject: Track calls to wbeditentity and usage of the clear switch
......................................................................

Track calls to wbeditentity and usage of the clear switch

Bug: T171609
Change-Id: If316331e1bfa4a35fef50b6b46a2ab913d08b3d4
---
M repo/includes/Api/EditEntity.php
1 file changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/03/367703/1

diff --git a/repo/includes/Api/EditEntity.php b/repo/includes/Api/EditEntity.php
index c6768e4..6d7a1c5 100644
--- a/repo/includes/Api/EditEntity.php
+++ b/repo/includes/Api/EditEntity.php
@@ -252,11 +252,19 @@
 
                if ( $preparedParameters['clear'] ) {
                        $entity = $this->clearEntity( $entity );
+
+                       $this->getStats()->increment( 
'wikibase.api.EditEntity.modifyEntity.clear' );
+               } else {
+                       $this->getStats()->increment( 
'wikibase.api.EditEntity.modifyEntity.no-clear' );
                }
 
-               // if we create a new property, make sure we set the datatype
-               if ( !$exists && $entity instanceof Property ) {
-                       $entity->setDataTypeId( $data['datatype'] );
+               if ( !$exists ) {
+                       // if we create a new property, make sure we set the 
datatype
+                       if ( $entity instanceof Property ) {
+                               $entity->setDataTypeId( $data['datatype'] );
+                       }
+
+                       $this->getStats()->increment( 
'wikibase.api.EditEntity.modifyEntity.create' );
                }
 
                $changeOps = $this->getChangeOp( $data, $entity );

-- 
To view, visit https://gerrit.wikimedia.org/r/367703
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If316331e1bfa4a35fef50b6b46a2ab913d08b3d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to