Compare commits

...

2 Commits

View File

@ -278,7 +278,13 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
$id = strtr($id, $toRemove); $id = strtr($id, $toRemove);
} }
if (preg_match("/^[0-9-X]*$/", $id) === false) return false; // There is an issue with this regex
if (preg_match("/^[0-9-X]*$/", $id) === false) {
return false;
}
if (is_numeric(strtr($id, ['-' => '', 'X' => ''])) === false) {
return false;
}
return $id; return $id;
@ -376,7 +382,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
self::bnf => self::validateNumericId($id, ["https://catalogue.bnf.fr/ark:/12148/cb"]), self::bnf => self::validateNumericId($id, ["https://catalogue.bnf.fr/ark:/12148/cb"]),
self::cona => self::validateNumericId($id, ['https://vocab.getty.edu/page/cona/']), self::cona => self::validateNumericId($id, ['https://vocab.getty.edu/page/cona/']),
self::editionhumboldtdigital => self::validateGndId($id, ['https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/']), self::editionhumboldtdigital => self::validateGndId($id, ['https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/']),
self::gnd => self::validateGndId($id, ['https://d-nb.info/gnd/']), self::gnd => self::validateGndId($id, ['http://d-nb.info/gnd/', 'https://d-nb.info/gnd/']),
self::grobsystematik => self::validateNumericId($id, ['https://term.museum-digital.de/grobsystematik/tag/']), self::grobsystematik => self::validateNumericId($id, ['https://term.museum-digital.de/grobsystematik/tag/']),
self::iconclass => self::validateIconclassId($id), self::iconclass => self::validateIconclassId($id),
self::lcsh => self::validateLcshId($id), self::lcsh => self::validateLcshId($id),