Code

Readded phone number length check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 9 Mar 2009 13:17:21 +0000 (13:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 9 Mar 2009 13:17:21 +0000 (13:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13515 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc

index 8cbd9e85e707c220ea0bafbc9bf6d8d105aa89a1..bfa7eab74d537c8c365d6c0d82a58c85722a8e76 100644 (file)
@@ -1192,7 +1192,10 @@ class phoneAccount extends plugin
 
     /* Add phone number */
     if (isset($_POST["add_phonenumber"]) && $_POST['phonenumber']){
-      if (tests::is_phone_nr($_POST['phonenumber'])){
+
+      if(strlen(trim($_POST["phonenumber"])) > 5 ){
+        msg_dialog::display(_("Error"), msgPool::toobig("Phone number",99999), ERROR_DIALOG);
+      }elseif (tests::is_phone_nr($_POST['phonenumber'])){
         $number= trim($_POST["phonenumber"]);
         $this->phoneNumbers[$number]= $number;
         $this->is_modified= TRUE;