Extend list of repository names accepted for referring to the different

MDNodaRepository cases
This commit is contained in:
Joshua Ramon Enslin 2023-10-19 16:11:37 +02:00
parent 7c7fb58a0d
commit d2dd24baee
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -539,7 +539,10 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
if (filter_var($id, FILTER_VALIDATE_URL) !== false) { if (filter_var($id, FILTER_VALIDATE_URL) !== false) {
$id = strtr($id, [ $id = strtr($id, [
'http://www.wikidata.org/wiki/' => '',
'http://www.wikidata.org/entity/' => '',
'https://www.wikidata.org/wiki/' => '', 'https://www.wikidata.org/wiki/' => '',
'https://www.wikidata.org/entity/' => '',
'https://www.wikidata.org/w/index.php?search=&search=' => '', 'https://www.wikidata.org/w/index.php?search=&search=' => '',
]); ]);
} }
@ -644,7 +647,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::mbl => self::validateNumericId($id, ['http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=']), self::mbl => self::validateNumericId($id, ['http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=', 'http://www.uni-magdeburg.de/mbl/Biografien/', '.htm']),
self::mindatorg => self::validateNumericId($id, ['https://www.mindat.org/min-', '.html']), self::mindatorg => self::validateNumericId($id, ['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', '.html', '#adbcontent', '#ndbcontent', '#indexcontent']), self::ndb_adb => self::validateGndId($id, ['https://www.deutsche-biographie.de/pnd', '.html', '#adbcontent', '#ndbcontent', '#indexcontent']),