summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3133ea5)
raw | patch | inline | side by side (parent: 3133ea5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Dec 2007 07:52:46 +0000 (07:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Dec 2007 07:52:46 +0000 (07:52 +0000) |
- If phonenumber is changed the old number(s) will be removed now.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7989 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7989 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 35b134d4f092012269186d7ba73f5e7e7c2f5b5e..b35d41960f31a8b6d1269f6b5ad6553d6eafd4e5 100644 (file)
**********************/
/* Check if there is an old entry
- * If there is en old entry, get callerid and remove voicemail and extensions too
+ * If there is an old entry, get callerid and remove voicemail and extensions
*/
if($old_connection){
$query = "SELECT id,name,callerid FROM ".$a_Remove['SIP_TABLE']." WHERE name='".$this->uid."';";
foreach($query_a as $qry){
if(!mysql_query($qry,$old_connection)){
- echo $qry;
echo mysql_error($old_connection);
}
}
/* Remove old entries */
$query = array();
$query[]= "DELETE FROM ".$a_New['EXT_TABLE']." WHERE exten=\"".$this->uid."\";";
+ foreach($oldnums as $s_telenums){
+ $query[]= "DELETE FROM ".$a_New['EXT_TABLE']." WHERE exten=\"".$s_telenums."\";";
+ }
foreach($newnums as $s_telenums){
$query[]= "DELETE FROM ".$a_New['EXT_TABLE']." WHERE exten=\"".$s_telenums."\";";
}