Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions classes/task/UpdateRorRegistryDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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();
}
}
Expand Down