Accept http:// mindat links

This commit is contained in:
2025-12-12 13:49:07 +01:00
parent 3d8dac9910
commit ae1d37f050
2 changed files with 6 additions and 1 deletions

View File

@@ -734,7 +734,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
self::klbb => self::validateNumericId($id, ['https://www.kl-bb.de/artist/', 'https://www.kl-bb.de/?page=actor&subPage=']), self::klbb => self::validateNumericId($id, ['https://www.kl-bb.de/artist/', 'https://www.kl-bb.de/?page=actor&subPage=']),
self::lcsh => self::validateLcshId($id), self::lcsh => self::validateLcshId($id),
self::loc => self::validateLocId($id), self::loc => self::validateLocId($id),
self::mindatorg => self::validateNumericId($id, ['https://www.mindat.org/min-', '.html']), self::mindatorg => self::validateNumericId($id, ['http://www.mindat.org/min-', 'https://www.mindat.org/min-', '.html']),
self::moebeltypologie => self::validateNumericId($id, ['https://term.museum-digital.de/moebel/tag/']), self::moebeltypologie => self::validateNumericId($id, ['https://term.museum-digital.de/moebel/tag/']),
self::ndb_adb => self::validateGndId($id, ['https://www.deutsche-biographie.de/pnd', 'https://www.deutsche-biographie.de/gnd', '.html', '#adbcontent', '#ndbcontent', '#indexcontent']), self::ndb_adb => self::validateGndId($id, ['https://www.deutsche-biographie.de/pnd', 'https://www.deutsche-biographie.de/gnd', '.html', '#adbcontent', '#ndbcontent', '#indexcontent']),
self::ndl => self::validateNumericId($id, [ self::ndl => self::validateNumericId($id, [

View File

@@ -87,6 +87,11 @@ final class MDNodaRepositoryTest extends TestCase {
self::assertEquals(false, MDNodaRepository::col->validateId("123123")); self::assertEquals(false, MDNodaRepository::col->validateId("123123"));
self::assertEquals("C46V", MDNodaRepository::col->validateId("https://www.catalogueoflife.org/data/taxon/C46V")); self::assertEquals("C46V", MDNodaRepository::col->validateId("https://www.catalogueoflife.org/data/taxon/C46V"));
self::assertEquals("CRLT8", MDNodaRepository::col->validateId("https://www.catalogueoflife.org/data/taxon/CRLT8")); self::assertEquals("CRLT8", MDNodaRepository::col->validateId("https://www.catalogueoflife.org/data/taxon/CRLT8"));
self::assertEquals("CRLT8", MDNodaRepository::col->validateId("http://www.catalogueoflife.org/data/taxon/CRLT8"));
self::assertEquals(false, MDNodaRepository::mindatorg->validateId("adfdasjfklasjl"));
self::assertEquals("2047", MDNodaRepository::mindatorg->validateId("https://www.mindat.org/min-2047.html"));
self::assertEquals("2047", MDNodaRepository::mindatorg->validateId("http://www.mindat.org/min-2047.html"));
} }
} }