From 8e7659b46badb91dedaf86dae272f8821c884895 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Wed, 17 Dec 2025 11:18:34 +0100 Subject: [PATCH] pkp/pkp-lib#12148 Fix ROR registry CSV file name dependance --- classes/task/UpdateRorRegistryDataset.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/classes/task/UpdateRorRegistryDataset.php b/classes/task/UpdateRorRegistryDataset.php index 5b1af95424c..cc9cfde0f94 100644 --- a/classes/task/UpdateRorRegistryDataset.php +++ b/classes/task/UpdateRorRegistryDataset.php @@ -83,9 +83,6 @@ class UpdateRorRegistryDataset extends ScheduledTask /** @var string API Url of the data dump versions. */ private string $urlVersions = 'https://zenodo.org/api/communities/ror-data/records?q=&sort=newest'; - /** @var string The file contains the following text in the name. */ - private string $csvNameContains = 'ror-data_schema_v2.csv'; - /** @var string The prefix used for the temporary zip file and the extracted directory. */ private string $prefix = 'TemporaryRorRegistryCache'; @@ -228,7 +225,7 @@ private function getPathCsv(string $pathZipDir): string $iterator = new DirectoryIterator($pathZipDir); foreach ($iterator as $fileInfo) { if (!$fileInfo->isDot()) { - if (str_contains($fileInfo->getFilename(), $this->csvNameContains)) { + if (strtolower($fileInfo->getExtension()) == 'csv') { return $fileInfo->getPathname(); } }