index 4b846e5722e26f1811178f9ba6aac370a5a51eb7..33e58523a94abddb8a76b4cd4bf8edc1fcc187d9 100644 (file)
/* This function is used to into the systems syslog */
function log_into_syslog($entry)
{
- $str = $entry['user']." ".$entry['action']." ".$entry['object']." from type ".$entry['objecttype']." ".$entry['changes']." : Result was ".$entry['result'];
+ $str= "";
+ if (empty($entry['object']) && empty($entry['changes'])) {
+ $str = "(".$entry['action'].") ".$entry['objecttype'].": ".$entry['result'];
+ } else {
+ $str = "(".$entry['action'].") ".$entry['object']." of type ".$entry['objecttype']." ".$entry['changes'].": ".$entry['result'];
+ }
gosa_log($str);
}
/* Connect to the database
*/
+ ini_set("mysql.connect_timeout",5);
$con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
$error = msgPool::dbconnect(_("MySQL logging"),mysql_error());