summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4c8ae52)
raw | patch | inline | side by side (parent: 4c8ae52)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Jun 2005 11:01:10 +0000 (11:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Jun 2005 11:01:10 +0000 (11:01 +0000) |
plugins/admin/systems/class_phoneGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index ddaeb30bfb4f321cde709cf8ee4d8817e4997abe..5a7b9b14b0e4b4857b499e564f3dffc2880ba95c 100644 (file)
$message= array();
$this->dn= "cn=".$this->cn.",ou=phones,ou=systems,".$this->base;
+ /* To check for valid ip*/
+ $num="(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
+ if (!preg_match("/^$num\\.$num\\.$num\\.$num$/", $this->goFonDefaultIP)){
+ $message[]= _("Wrong IP format in field goFonDefaultIP\\n");
+ }
+
+ if((strlen($this->goFonQualify))!=(strlen((int)($this->goFonQualify)))){
+ $message[]= _("The given value for goFonQualify is not a valid number.");
+ }
+
/* must: cn, macAddress, ipHostNumber */
if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
$message[]= _("The required field 'Phone name' is not set.");