Accept http:// mindat links
This commit is contained in:
@@ -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::lcsh => self::validateLcshId($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::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, [
|
||||
|
||||
@@ -87,6 +87,11 @@ final class MDNodaRepositoryTest extends TestCase {
|
||||
self::assertEquals(false, MDNodaRepository::col->validateId("123123"));
|
||||
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("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"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user