From: hickert Date: Tue, 6 Apr 2010 07:54:26 +0000 (+0000) Subject: Added a bit more debugging to the gofon macro stuff,. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9aa1283e27ce4825cabbeb662244b0dbf60118c8;p=gosa.git Added a bit more debugging to the gofon macro stuff,. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17476 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 817b7aead..012894b15 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -211,6 +211,7 @@ class macro extends plugin @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query"); if(!$res){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); + @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"".$query."", "ERROR"); return ( msgPool::dbquery("GOfon",@mysql_error($r_current),$Server['SERVER'])); } @mysql_close($r_current); @@ -273,12 +274,20 @@ class macro extends plugin */ $tmp = explode(",", $s_linestr,3); + // No priority given ... somehow + if(count($tmp) == 2){ + $tmp = array($tmp[0],"1",$tmp[1]); + } + /* Check if there is an application given */ - if(empty($tmp[1])){ + if($tmp[2] == ""){ return(sprintf(_("Application missing in line %s!"),$i_linenum)); } + if($tmp[1] == ""){ + return(sprintf(_("Priority missing in line %s!"),$i_linenum)); + } /* Check if there is an extension given */ - if(empty($tmp[0])){ + if($tmp[0] == ""){ return(sprintf(_("Extension missing in line %s!"),$i_linenum)); } @@ -308,6 +317,7 @@ class macro extends plugin @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query"); if(!$res){ new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con)); + @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"".$query."", "ERROR"); } @mysql_close($r_con); }