summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fc9d68)
raw | patch | inline | side by side (parent: 8fc9d68)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Dec 2007 09:51:05 +0000 (09:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Dec 2007 09:51:05 +0000 (09:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7996 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index 9a10edd434cb68308091afb412077d73b930e551..27c53b66eb11188e1db1d9ffc8545a4255d1adf5 100644 (file)
if($this->goFonHomeServer != $this->init_HomeServer){
$query = "SELECT id FROM ".$cfg_Current['EXT_TABLE']." WHERE exten='".$this->telephoneNumber."' OR '".$this->cn."';";
$res = @mysql_query($query,$res_cur);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
gosa_log(@mysql_error($res_cur));
return(_("Can not check if there are already some entries with given telephone number and/or cn in the destination home server.").
/* Query and ensure that everything went fine */
$res = @mysql_query($SQL,$res_cur);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query");
if(!$res){
gosa_log(@mysql_error($res_cur));
return(_("Can not remove entries with some telephone number and/or cn from destination home server.").
}
foreach($SQL as $sqlsyn){
mysql_query($sqlsyn,$res_cur);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$sqlsyn, "Database query");
}
}
/* Check if there is an old entry */
$query = "SELECT id FROM ".$cfg_Init['EXT_TABLE']." WHERE exten='".$this->old_tele_number."' OR '".$this->old_cn."';";
$res = @mysql_query($query,$r_init);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
gosa_log(@mysql_error($r_init));
return(_("Can not check if entry exists in old database. Please have a look a the gosa logfiles."));
/* Query and ensure that everything went fine */
$res = @mysql_query($SQL,$r_init);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query");
if(!$res){
gosa_log(@mysql_error($r_init));
return(_("Can not remove old entries from initial home server. Please have a look a the gosa logfiles."));
index a7a8a6c13ebef8b925dd1584e7d5a903345cc065..b3ac8d45624d75026ceebec510e66b76017cdbb9 100755 (executable)
$r_current = @mysql_pconnect($Server['SERVER'],$Server['LOGIN'],$Server['PASSWORD']);
$db_current = @mysql_select_db($Server['DB'],$r_current);
$res = @mysql_query($query,$r_current);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
gosa_log(@mysql_error($r_current));
return(sprintf(_("Removing macro from '%s' failed. Check GOsa log for mysql error."),$Server['SERVER']));
$db = @mysql_select_db($cfg['DB'],$r_con);
$query = preg_replace("/%TABLENAME%/",$cfg['EXT_TABLE'],$sql);
$res = @mysql_query($query,$r_con);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
gosa_log(@mysql_error($r_con));
return(sprintf(_("Insert of new macro failed for server '%s'."),$cfg['SERVER']));
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 950484fe2611930e9a7fc82498baccf09b323a73..f1d41463b66fa73e5afb85b40ccfcd06444df1bc 100644 (file)
$r_con = @mysql_pconnect($cur_cfg['SERVER'],$cur_cfg['LOGIN'],$cur_cfg['PASSWORD']);
if($r_con){
$r_db = @mysql_select_db($cur_cfg['DB'],$r_con);
- $vp = mysql_fetch_row(mysql_query("SELECT ".$cur_cfg['VOICE_TABLE'].".password FROM ".$cur_cfg['VOICE_TABLE'].", ".$cur_cfg['SIP_TABLE']." WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'"));
+
+ $query_tmp = "SELECT ".$cur_cfg['VOICE_TABLE'].".password FROM ".$cur_cfg['VOICE_TABLE'].", ".
+ $cur_cfg['SIP_TABLE']." WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'";
+ $vp = mysql_fetch_row(mysql_query($query_tmp));
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query_tmp, "Database query");
if((isset($vp[0]))&&(!empty($vp[0]))){
$this->goFonPINVoice = $vp[0];
}
if($old_connection){
$query = "SELECT id,name,callerid FROM ".$a_Remove['SIP_TABLE']." WHERE name='".$this->uid."';";
$rid = mysql_query($query,$old_connection);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
/* Old entry found, remove it */
$query_a = array();
}
foreach($query_a as $qry){
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$qry, "Database query");
if(!mysql_query($qry,$old_connection)){
echo mysql_error($old_connection);
}
/* Check if there is already an entry in sip_users for this uid */
$SQL_query_array = array();
- $rid = mysql_query("SELECT * FROM ".$a_New['SIP_TABLE']." WHERE name='".$this->uid."';\n",$new_connection);
+ $query = "SELECT * FROM ".$a_New['SIP_TABLE']." WHERE name='".$this->uid."';\n";
+ $rid = mysql_query($query,$new_connection);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(mysql_affected_rows($new_connection)){
/**********************
}
/* Check if there is already an entry in sip_users for this uid */
- $rid = mysql_query("SELECT * FROM ".$a_New['VOICE_TABLE']." WHERE customer_id='".$customer_id."';\n",$new_connection);
+ $query_tmp = "SELECT * FROM ".$a_New['VOICE_TABLE']." WHERE customer_id='".$customer_id."';\n";
+ $rid = mysql_query($query_tmp,$new_connection);
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query_tmp, "Database query");
if(mysql_affected_rows($new_connection)){
/**********************
$query[]= "DELETE FROM ".$a_New['EXT_TABLE']." WHERE exten=\"".$s_telenums."\";";
}
foreach($query as $qry){
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$qry, "Database query");
if(!mysql_query($qry,$new_connection)){
echo mysql_error($new_connection);
}
// Perform queries ...
if($this->goFonHardware != "automatic"){
foreach($SQL_query_array as $query){
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!@mysql_query($query,$new_connection)){
print_red(_("Error while performing query:")." ".mysql_error());
return false;
$SQL[] = "DELETE FROM ".$a_SETUP['SIP_TABLE']." WHERE name='".$this->uid."';\n";
foreach($SQL as $query){
+ @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!@mysql_query($query,$r_con)){
print_red(_("Stop".mysql_error()));
return false;