From ce9d58fc4694f685a74e9aa6550fba46a6cfb258 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 21 Mar 2006 11:58:09 +0000 Subject: [PATCH] Fixed foreach error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2878 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/phoneaccount/class_phoneAccount.inc | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index d2016b629..78acac303 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -433,14 +433,15 @@ class phoneAccount extends plugin $SQL[] = "DELETE FROM ".$a_SETUP['VOICE_TABLE']." WHERE customer_id=".$newnums[$i_new_key].";"; // Delete old entries $b_first_deleted =false; - foreach($oldnums as $s_telenums){ - $SQL[] = "DELETE FROM ".$a_SETUP['EXT_TABLE']." WHERE exten='".$s_telenums."';\n"; - if(!$b_first_deleted){ - $b_first_deleted=true; - $SQL[] = "DELETE FROM ".$a_SETUP['VOICE_TABLE']." WHERE customer_id=".$s_telenums.";"; + if(is_array($oldnums)){ + foreach($oldnums as $s_telenums){ + $SQL[] = "DELETE FROM ".$a_SETUP['EXT_TABLE']." WHERE exten='".$s_telenums."';\n"; + if(!$b_first_deleted){ + $b_first_deleted=true; + $SQL[] = "DELETE FROM ".$a_SETUP['VOICE_TABLE']." WHERE customer_id=".$s_telenums.";"; + } } } - if($this->goFonHardware=="automatic"){ foreach($SQL as $query ){ mysql_query($query) ; @@ -1150,6 +1151,13 @@ $ldap->modify ($this->attrs); } } } + + function getSaveDialog() + { + + return("Phone"); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -- 2.30.2