added nis_alias for nisMailAlias module

This commit is contained in:
Roland Gruber 2004-12-31 13:50:30 +00:00
parent 236b7d288c
commit 8f9507dc2a
1 changed files with 3 additions and 0 deletions

View File

@ -502,6 +502,9 @@ function get_preg($argument, $regexp) {
case 'DNSname': case 'DNSname':
$pregexpr = '/^[0-9a-zA-Z_-]+(\\.[0-9a-zA-Z_-]+)*$/'; $pregexpr = '/^[0-9a-zA-Z_-]+(\\.[0-9a-zA-Z_-]+)*$/';
break; break;
case 'nis_alias':
$pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+$/u';
break;
} }
if ($pregexpr!='') if ($pregexpr!='')
if (preg_match($pregexpr, $argument)) { if (preg_match($pregexpr, $argument)) {