From: hickert Date: Tue, 4 Dec 2007 07:53:49 +0000 (+0000) Subject: Closes #293 Old phonenumbers will be removed again. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=12767c0b935e818a003c8e744669645df6a67fc9;hp=28160d5f8a48fd5a2e2450df5251a717cbb78e74;p=gosa.git Closes #293 Old phonenumbers will be removed again. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7990 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 6c8310959..950484fe2 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -467,7 +467,7 @@ class phoneAccount extends plugin **********************/ /* 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."';"; @@ -486,7 +486,6 @@ class phoneAccount extends plugin foreach($query_a as $qry){ if(!mysql_query($qry,$old_connection)){ - echo $qry; echo mysql_error($old_connection); } } @@ -667,6 +666,9 @@ class phoneAccount extends plugin /* 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."\";"; }