foreach ($patterns as $pattern) {
if (!\CRM_Utils_String::endsWith($pattern, '*')) {
if ($allowNew || in_array($pattern, $allStrings)) {
foreach ($patterns as $pattern) {
if (!\CRM_Utils_String::endsWith($pattern, '*')) {
if ($allowNew || in_array($pattern, $allStrings)) {