From: hickert Date: Thu, 21 Dec 2006 10:15:25 +0000 (+0000) Subject: Don't save anything to database if hardware is 'automatic'. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2eb89ac425242c4f0174ff1e8fe899c193ba30f0;p=gosa.git Don't save anything to database if hardware is 'automatic'. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5455 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index dd4bc090e..757412c93 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -104,13 +104,11 @@ class phoneAccount extends plugin print_red( sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cur_cfg['SERVER'],$cur_cfg['LOGIN'])); gosa_log(mysql_error()); - return false; } $db = @mysql_select_db($cur_cfg['DB'],$r_con); if(!$db){ print_red(sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER'])); gosa_log(mysql_error()); - return false; } $first = false; @@ -751,10 +749,12 @@ class phoneAccount extends plugin } // Perform queries ... - foreach($SQL_query_array as $query){ - if(!@mysql_query($query,$new_connection)){ - print_red(_("Error while performing query:")." ".mysql_error()); - return false; + if($this->goFonHardware != "automatic"){ + foreach($SQL_query_array as $query){ + if(!@mysql_query($query,$new_connection)){ + print_red(_("Error while performing query:")." ".mysql_error()); + return false; + } } } }