allow spaces in suffixes and ou's

This commit is contained in:
Roland Gruber 2003-11-06 22:02:58 +00:00
parent 5a735e1c5a
commit ac919a161e
2 changed files with 9 additions and 9 deletions

View File

@ -314,7 +314,7 @@ class Config {
// returns true if $value has correct format // returns true if $value has correct format
function set_Adminstring($value) { function set_Adminstring($value) {
if (is_string($value) && if (is_string($value) &&
eregi("^([a-z0-9]|-)+=([a-z0-9]|-)+(,([a-z0-9]|-)+=([a-z0-9]|-)+)+(;([a-z0-9]|-)+=([a-z0-9]|-)+(,([a-z0-9]|-)+=([a-z0-9]|-)+)+)*$", $value)) { eregi("^[a-z0-9\\-]+=[a-z0-9\\-]+(,[a-z0-9\\-]+=[a-z0-9 \\-]+)+(;[a-z0-9\\-]+=[a-z0-9\\-]+(,[a-z0-9\\-]+=[a-z0-9 \\-]+)+)*$", $value)) {
$this->Admins = $value; $this->Admins = $value;
} }
else return false; else return false;
@ -344,7 +344,7 @@ class Config {
// $value: new user suffix // $value: new user suffix
// returns true if $value has correct format // returns true if $value has correct format
function set_UserSuffix($value) { function set_UserSuffix($value) {
if (is_string($value) && (eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $value))) { if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->usersuffix = $value; $this->usersuffix = $value;
} }
else return false; else return false;
@ -360,7 +360,7 @@ class Config {
// $value: new group suffix // $value: new group suffix
// returns true if $value has correct format // returns true if $value has correct format
function set_GroupSuffix($value) { function set_GroupSuffix($value) {
if (is_string($value) && (eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $value))) { if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->groupsuffix = $value; $this->groupsuffix = $value;
} }
else return false; else return false;
@ -376,7 +376,7 @@ class Config {
// $value: new host suffix // $value: new host suffix
// returns true if $value has correct format // returns true if $value has correct format
function set_HostSuffix($value) { function set_HostSuffix($value) {
if (is_string($value) && (eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $value))) { if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->hostsuffix = $value; $this->hostsuffix = $value;
} }
else return false; else return false;
@ -393,7 +393,7 @@ class Config {
// returns true if $value has correct format // returns true if $value has correct format
function set_DomainSuffix($value) { function set_DomainSuffix($value) {
if (!$value && ($this->get_Samba3() == "no")) $this->domainsuffix = ""; if (!$value && ($this->get_Samba3() == "no")) $this->domainsuffix = "";
elseif (is_string($value) && (eregi("^(([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)(,([a-z]|-|[0-9])*=([a-z]|-|[0-9])*)*$", $value))) { elseif (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->domainsuffix = $value; $this->domainsuffix = $value;
} }
else return false; else return false;