diff --git a/include/class_log.inc b/include/class_log.inc
index de8154fe46d9a3f4fef51e09a7a311e4b8d79b94..af687c39e605b2c64bcdc03cd0d0f0bc9ed97470 100644 (file)
--- a/include/class_log.inc
+++ b/include/class_log.inc
*/
function log($action,$objecttype,$object,$changes_array = array(),$result = TRUE)
{
+ if(!is_array($changes_array)){
+ trigger_error("log(string,string,string,array(),bool). Forth parameter must be an array.");
+ $changes_array = array();
+ }
+
$entry = array();
if(!isset($_SESSION['config'])){
$entry['user']= "unkown";
}else{
- $this->config = $_SESSION['config'];
+ $this->config = &$_SESSION['config'];
$ui = get_userinfo();
$entry['user']= @$ui->dn;
}
}
foreach($servers as $server_name => $server){
-
- $con = mysql_pconnect($server_name,$server['USER'],$server['PWD']);
+
+ $con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
- print_red(sprintf(_("Could not connect to logging server %s."),$server['SERVER']));
+ print_red(sprintf(_("Could not connect to logging server %s."),$server_name));
}else{
$db = mysql_select_db($server['DB'],$con);
if(!$db){
}
}
+ mysql_close($con);
}
}
}