From 4b0eddfd4241c69ff97cc3372c69921f17e6f119 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 9 Mar 2009 13:17:21 +0000 Subject: [PATCH] Readded phone number length check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13515 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index 8cbd9e85e..bfa7eab74 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -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; -- 2.30.2