Add blacklist for actors' given names

This commit is contained in:
2026-02-11 14:40:11 +01:00
parent a0de048915
commit 18613beaaa

View File

@@ -97,6 +97,16 @@ final class NodaBlacklistedTerms {
],
];
public const ACTOR_GIVEN_NAMES_BLACKLIST = [
'Doktor',
'Dr.',
'PhD.',
'Dr',
'Frau',
'Herr',
];
/**
* Checks if an tag name is blacklisted.
*
@@ -201,4 +211,19 @@ final class NodaBlacklistedTerms {
return true;
}
/**
* Checks if an actor's given name is in the specific blacklist for those.
* Returns true if the name is blacklisted.
*
* @param string $given_name Given name.
*
* @return boolean
*/
public static function checkActorGivenNameIsBlacklisted(string $given_name):bool {
if (in_array($given_name, self::ACTOR_GIVEN_NAMES_BLACKLIST)) return true;
else return false;
}
}