Soeren.oldag has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/205595

Change subject: Corrected wrong file name.
......................................................................

Corrected wrong file name.

File with external values was mistakenly named 'external_data.csv' instead of 
'external_values.csv'. Changed also names of variables for consistency.

Change-Id: I79c798a1da8a3fdff237caa5966eaf9dd5790a8a
---
M includes/UpdateTable/Importer.php
M tests/phpunit/UpdateTable/testdata/external_data.tar
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQualityExternalValidation
 refs/changes/95/205595/1

diff --git a/includes/UpdateTable/Importer.php 
b/includes/UpdateTable/Importer.php
index 1ac95c6..07d6003 100644
--- a/includes/UpdateTable/Importer.php
+++ b/includes/UpdateTable/Importer.php
@@ -21,7 +21,7 @@
  */
 class Importer {
 
-    const EXTERNAL_DATA_FILE_NAME = "external_data.csv";
+    const EXTERNAL_VALUES_FILE_NAME = "external_values.csv";
     const DUMP_INFORMATION_FILE_NAME = "dump_information.csv";
     const IDENTIFIER_PROPERTIES_FILE_NAME = "identifier_properties.csv";
 
@@ -33,7 +33,7 @@
     /**
      * @var string
      */
-    private $entitiesFilePath;
+    private $externalValuesFilePath;
 
     /**
      * @var string
@@ -87,7 +87,7 @@
         $tempDir = sys_get_temp_dir();
         $test->extractTo( $tempDir, null, true );
 
-        $this->entitiesFilePath = $tempDir . DIRECTORY_SEPARATOR . 
self::EXTERNAL_DATA_FILE_NAME;
+        $this->externalValuesFilePath = $tempDir . DIRECTORY_SEPARATOR . 
self::EXTERNAL_VALUES_FILE_NAME;
         $this->dumpInformationFilePath = $tempDir . DIRECTORY_SEPARATOR . 
self::DUMP_INFORMATION_FILE_NAME;
         $this->identifierPropertiesFilePath = $tempDir . DIRECTORY_SEPARATOR . 
self::IDENTIFIER_PROPERTIES_FILE_NAME;
     }
@@ -96,10 +96,10 @@
      * Deletes the extracted CSV files
      */
     private function deleteExtractedFiles() {
-        if ( file_exists( $this->entitiesFilePath ) ) {
-            unlink( $this->entitiesFilePath );
+        if ( file_exists( $this->externalValuesFilePath ) ) {
+            unlink( $this->externalValuesFilePath );
         }
-        $this->entitiesFilePath = null;
+        $this->externalValuesFilePath = null;
 
         if ( file_exists( $this->dumpInformationFilePath ) ) {
             unlink( $this->dumpInformationFilePath );
@@ -273,7 +273,7 @@
             print "Insert new entries\n";
         }
 
-        $csvFile = fopen( $this->entitiesFilePath, 'rb' );
+        $csvFile = fopen( $this->externalValuesFilePath, 'rb' );
 
         $i = 0;
         $accumulator = array();
diff --git a/tests/phpunit/UpdateTable/testdata/external_data.tar 
b/tests/phpunit/UpdateTable/testdata/external_data.tar
index 67bdd65..25518f0 100644
--- a/tests/phpunit/UpdateTable/testdata/external_data.tar
+++ b/tests/phpunit/UpdateTable/testdata/external_data.tar
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79c798a1da8a3fdff237caa5966eaf9dd5790a8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag <soeren_ol...@freenet.de>

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

Reply via email to