summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8449bbe)
raw | patch | inline | side by side (parent: 8449bbe)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Feb 2009 14:49:44 +0000 (14:49 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Feb 2009 14:49:44 +0000 (14:49 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13401 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index de8d4cc14a26bef1b979f490df259f71e6977cec..acaf44f7dfad99f192388fcc4593618aac9dd929 100644 (file)
/* 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 {