summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7fcd660)
raw | patch | inline | side by side (parent: 7fcd660)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Sep 2005 07:55:27 +0000 (07:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Sep 2005 07:55:27 +0000 (07:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1280 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 f274977a10cb72dc97de2496d18acd8972b4e062..f9dd48cae81d35805d7848e0e99a12aabd945fc0 100644 (file)
return false;
}
- $existence = mysql_fetch_row(mysql_query( "SELECT * FROM ".$a_SETUP['SIP_TABLE']." WHERE name='".$this->uid."';"));
+ $existence = @mysql_fetch_row(@mysql_query( "SELECT * FROM ".$a_SETUP['SIP_TABLE']." WHERE name='".$this->uid."';"));
if(!$existence&&((empty($this->goFonPIN))||(empty($this->goFonVoicePIN)))){
$this->generate_error = _("You are currently creating a new phone account, please specify a value for phone PIN and voice PIN.");
}
if(isset($existence[15])){
- $voice = mysql_fetch_row(mysql_query("SELECT password FROM ".$a_SETUP['VOICE_TABLE']." where customer_id='".$existence[15]."'"));
+ $voice = @mysql_fetch_row(@mysql_query("SELECT password FROM ".$a_SETUP['VOICE_TABLE']." where customer_id='".$existence[15]."'"));
if((empty($this->goFonVoicePIN))&&(empty($voice[0]))){
$this->generate_error = _("The voice PIN attribute is missing in database entry. Please assign a valid voice PIN.");
return(false);
/* Get old voice passwword if no new isset */
if($this->goFonPIN==false){
- $pin = mysql_fetch_row(mysql_query("SELECT secret FROM ".$a_SETUP['SIP_TABLE']." where name='".$this->uid."'"));
+ $pin = @mysql_fetch_row(@mysql_query("SELECT secret FROM ".$a_SETUP['SIP_TABLE']." where name='".$this->uid."'"));
$this->goFonPIN = $pin[0];
}
/* Get old voice passwword if no new isset */
if($this->goFonVoicePIN==false){
- $voice = mysql_fetch_row(mysql_query("SELECT password FROM ".$a_SETUP['VOICE_TABLE']." where customer_id=".$this->phoneNumbers[$i_new_key].""));
+ $voice = @mysql_fetch_row(@mysql_query("SELECT password FROM ".$a_SETUP['VOICE_TABLE']." where customer_id=".$this->phoneNumbers[$i_new_key].""));
$this->goFonVoicePIN = $voice[0];
}
/* Get old voice passwword if no new isset */
if($this->goFonPIN==false){
- $pin = mysql_fetch_row(mysql_query("SELECT secret FROM ".$a_SETUP['SIP_TABLE']." where name='".$this->uid."'"));
+ $pin = @mysql_fetch_row(@mysql_query("SELECT secret FROM ".$a_SETUP['SIP_TABLE']." where name='".$this->uid."'"));
$this->goFonPIN = $pin[0];
}
// Perform queries ...
foreach($SQL as $query){
- if(!mysql_query($query,$r_con)){
+ if(!@mysql_query($query,$r_con)){
print_red(_("Error while performing query ".mysql_error()));
return false;
}
{
foreach($this->attributes as $key=>$val){
-
if(in_array($val,array("uid","cn","mail"))){
unset($this->attributes[$key]);
unset($this->$val);
}
-
}
+ $this->attributes[]="goFonPIN";
+
// Get Configuration for Mysql database Server
$a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];
$s_parameter ="";
if(!$r_con){
$this->generate_error = sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
$a_SETUP['SERVER'],$a_SETUP['LOGIN']);
- gosa_log(mysql_error());
+ gosa_log(@mysql_error());
return false;
}
// Test if we have the database selected correctly
if(!$db){
$this->generate_error = sprintf(_("Can't select database %s on %s."),$a_SETUP['DB'],$a_SETUP['SERVER']);
- gosa_log(mysql_error());
+ gosa_log(@mysql_error());
return false;
}
foreach($SQL as $query){
- if(!mysql_query($query,$r_con)){
+ if(!@mysql_query($query,$r_con)){
print_red(_("Stop".mysql_error()));
return false;
}