Add lowercase ndb/adb to list of readable noda repository names

This commit is contained in:
Joshua Ramon Enslin 2023-08-09 16:31:03 +02:00
parent 7fb7bb83c1
commit 9bca8f400e
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -72,6 +72,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
'MBL' => self::mbl,
'mindat.org' => self::mindatorg,
'moebeltypologie' => self::moebeltypologie,
'ndb/adb' => self::ndb_adb,
'NDB/ADB' => self::ndb_adb,
'ndl' => self::ndl,
'ndp-ikmk' => self::ndp_ikmk,
@ -364,7 +365,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
else if (substr($id, 0, 1) === 'n') {
if (filter_var(trim(substr($id, 1), '0'), FILTER_VALIDATE_INT) === false) return false;
}
else throw new MDgenericInvalidInputsException("LOC IDs must start with n or nr or nb");
else throw new MDgenericInvalidInputsException("LOC IDs must start with n or nr or nb (provided: " . strip_tags($id) . ")");
return (string)$id;