Andreasburmeister has submitted this change and it was merged.

Change subject: stop writing violations into table
......................................................................


stop writing violations into table

since we decided not to have this feature in version 1

Change-Id: Iffa4944e066dd083ed84332111e21082d0dba2ab
---
M WikidataQualityConstraintsHooks.php
M specials/SpecialConstraintReport.php
2 files changed, 2 insertions(+), 15 deletions(-)

Approvals:
  Andreasburmeister: Verified; Looks good to me, approved



diff --git a/WikidataQualityConstraintsHooks.php 
b/WikidataQualityConstraintsHooks.php
index d272a20..e57ae9d 100644
--- a/WikidataQualityConstraintsHooks.php
+++ b/WikidataQualityConstraintsHooks.php
@@ -32,4 +32,5 @@
                $db = $loadBalancer->getConnection( DB_MASTER );
                $db->insert( EVALUATION_TABLE, $accumulator );
        }
+
 }
\ No newline at end of file
diff --git a/specials/SpecialConstraintReport.php 
b/specials/SpecialConstraintReport.php
index 074bd8b..30bd39e 100755
--- a/specials/SpecialConstraintReport.php
+++ b/specials/SpecialConstraintReport.php
@@ -14,11 +14,9 @@
 use Wikibase\Repo\WikibaseRepo;
 use WikidataQuality\ConstraintReport\CheckForConstraintViolationsJob;
 use WikidataQuality\ConstraintReport\ConstraintCheck\ConstraintChecker;
-use 
WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResultToViolationTranslator;
 use WikidataQuality\Html\HtmlTable;
 use WikidataQuality\Html\HtmlTableHeader;
 use WikidataQuality\Specials\SpecialCheckResultPage;
-use WikidataQuality\Violations\ViolationStore;
 use JobQueueGroup;
 
 
@@ -102,7 +100,6 @@
                $constraintChecker = new ConstraintChecker( $this->entityLookup 
);
                $results = $constraintChecker->execute( $entity );
 
-               $this->saveResultsInViolationsTable( $entity, $results );
                $this->doEvaluation( $entity, $results );
                return $results;
        }
@@ -290,19 +287,8 @@
                );
        }
 
-       /**
-        * @param EntityDocument $entity
-        * @param array $results
-        */
-       protected function saveResultsInViolationsTable( $entity, $results ) {
-               $translator = new CheckResultToViolationTranslator();
-               $violations = $translator->translateToViolation( $entity, 
$results );
-               $violationStore = new ViolationStore();
-               $violationStore->insertViolations( $violations );
-       }
-
        protected function doEvaluation( $entity, $results ) {
-               //TODO: Push (deferred) job(s) in queue
+               //TODO: Push (deferred) job(s) in queue (seems to be okay but 
not working with mySql)
                $checkTimeStamp = wfTimestamp( TS_MW );
                $jobs = array ();
                $jobs[ ] = CheckForConstraintViolationsJob::newInsertNow( 
$entity, $checkTimeStamp, $results );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffa4944e066dd083ed84332111e21082d0dba2ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Jonaskeutel <jonas.keu...@student.hpi.de>
Gerrit-Reviewer: Andreasburmeister <andreas.burmeis...@student.hpi.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to