From 12767c0b935e818a003c8e744669645df6a67fc9 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Dec 2007 07:53:49 +0000 Subject: [PATCH 1/1] 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 --- plugins/gofon/phoneaccount/class_phoneAccount.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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."\";"; } -- 2.30.2