Code

Updated property registry
[gosa.git] / gosa-core / include / class_log.inc
index 24ee43237a267f9b4af9c8236191eb7cc8037444..13a128a74e0d8dfff262ed0f6976447e872aaae9 100644 (file)
@@ -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);