X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_log.inc;h=13a128a74e0d8dfff262ed0f6976447e872aaae9;hb=6f437b3335f1b7c24f52c7c2218b04e3bdea690c;hp=24ee43237a267f9b4af9c8236191eb7cc8037444;hpb=bb0e8e16b9779c9bca582e079ef42773c3e898ed;p=gosa.git diff --git a/gosa-core/include/class_log.inc b/gosa-core/include/class_log.inc index 24ee43237..13a128a74 100644 --- a/gosa-core/include/class_log.inc +++ b/gosa-core/include/class_log.inc @@ -77,8 +77,9 @@ class log { if(!isset($this->config) && empty($entry['user'])){ $entry['user'] = "unknown"; } - + /* Check if all given values are valid */ + global $config; $msgs = @log::check($entry); if(count($msgs)){ foreach($msgs as $msg){ @@ -86,7 +87,9 @@ class log { msg_dialog::display(_("Internal error"), sprintf(_("Logging failed: %s"), $msg), ERROR_DIALOG); } }else{ - $this->log_into_syslog($entry); + if(is_object($config) && preg_match("/true/i",$config->get_cfg_value("logging",""))){ + $this->log_into_syslog($entry); + } } } @@ -96,11 +99,11 @@ class log { $msgs = array(); if(!isset($entry['action']) || !in_array($entry['action'],array("modify","create","remove","copy","snapshot","view","security","debug"))){ - $msgs[] = sprintf(_("Invalid option '%s' specified!"), $entry['action']); + $msgs[] = sprintf(_("Invalid option %s specified!"), bold($entry['action'])); } if(!isset($entry['objecttype']) || empty($entry['objecttype'])){ - $msgs[] = _("Specified objectType is empty or invalid!"); + $msgs[] = _("Specified 'objectType' is empty or invalid!"); } return($msgs);