From 01a22288e954c1c9dc04c80ce540aff584c3c8cc Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 6 Feb 2009 14:49:44 +0000 Subject: [PATCH] Updated goPhone -Added check to avoid phone numbers larger than 5 digits. The real time extension will not work with larger values git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13401 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/gofon/phoneaccount/class_phoneAccount.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index de8d4cc14..acaf44f7d 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -1069,8 +1069,11 @@ class phoneAccount extends plugin /* Add phone number */ if (isset($_POST["add_phonenumber"]) && $_POST['phonenumber']){ - if (tests::is_phone_nr($_POST['phonenumber'])){ - $number= $_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; } else { -- 2.30.2