summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bcf995)
raw | patch | inline | side by side (parent: 4bcf995)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Feb 2010 08:38:02 +0000 (08:38 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Feb 2010 08:38:02 +0000 (08:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15643 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 d62f786d0492abdfb2379ca85d0fd343a89c6867..96d61a66d905ef972edd453cacdfbdf3ef7c495e 100644 (file)
return($ret);
}
+ function stripInvalidChars($tele){
+ /* Strip invalid chars, but maintain a leading + for international numbers */
+ $t_tele= preg_replace("/[^0-9]/","",$tele);
+ if (preg_match('/^\+/', $tele)) {
+ $t_tele= "+".$t_tele;
+ }
+ return($t_tele);
+ }
+
+
+
/* This function generates the Database entries.
* The Parameter 'save' could be true or false.
/* Prepare some basic attributes */
$oldnums = array();
- /* Strip invalid chars, but maintain a leading + for international numbers */
- $t_tele= preg_replace("/[^0-9]/","",$tele);
- if (preg_match('/^\+/', $tele)) {
- $t_tele= "+".$t_tele;
- }
-
foreach($this->a_old_telenums as $tele){
- $oldnums[]= $t_tele;
+ $oldnums[]= $this->stripInvalidChars($tele);
}
foreach($this->phoneNumbers as $tele){
- $newnums[]= $t_tele;
+ $newnums[]= $this->stripInvalidChars($tele);
}
if(empty($this->uid)) trigger_error("Uid is empty.");