From 561015a359502ed879dc63b56f4676c7bf41b535 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Dec 2007 09:46:06 +0000 Subject: [PATCH] Added DEBUG information to phone extensions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7995 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/conference/class_phoneConferenceGeneric.inc | 5 +++++ plugins/gofon/macro/class_gofonMacro.inc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index c79ce83f8..e8f436de4 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -456,6 +456,7 @@ class conference extends plugin 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){ new log("debug","gofonconference/".get_class($this),"",array(),@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."). @@ -468,6 +469,7 @@ class conference extends plugin /* Query and ensure that everything went fine */ $res = @mysql_query($SQL,$res_cur); + @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query"); if(!$res){ new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur)); return(_("Can not remove entries with some telephone number and/or cn from destination home server."). @@ -553,6 +555,7 @@ class conference extends plugin } foreach($SQL as $sqlsyn){ mysql_query($sqlsyn,$res_cur); + @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$sqlsyn, "Database query"); } } @@ -586,6 +589,7 @@ class conference extends plugin /* 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){ new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); return(_("Can not check if entry exists in old database. Please have a look a the gosa logfiles.")); @@ -599,6 +603,7 @@ class conference extends plugin /* Query and ensure that everything went fine */ $res = @mysql_query($SQL,$r_init); + @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query"); if(!$res){ new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); return(_("Can not remove old entries from initial home server. Please have a look a the gosa logfiles.")); diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index dba57adb7..1dbb4ee22 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -236,6 +236,7 @@ class macro extends plugin $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){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); return(sprintf(_("Removing macro from '%s' failed. Check GOsa log for mysql error."),$Server['SERVER'])); @@ -344,6 +345,7 @@ class macro extends plugin $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){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con)); return(sprintf(_("Insert of new macro failed for server '%s'."),$cfg['SERVER'])); -- 2.30.2