Code

Added title tag
[gosa.git] / plugins / admin / systems / class_goLogDBServer.inc
index 254abe369660ae282d0d7b9475f1ee49f55dce00..2003937a5459ac7f3c9f92f44ac69b7432b99020 100644 (file)
@@ -17,7 +17,7 @@ class goLogDBServer extends plugin{
   var $DisplayName      = "";
   var $dn               = NULL;
   var $acl;
-
+  var $cn                   = "";
   var $goLogDBServerStatus  = "";
   var $goLogAdmin           = "";
   var $goLogPassword        = "";  
@@ -158,6 +158,16 @@ class goLogDBServer extends plugin{
       foreach ($add_attrs as $name => $value){
         $command= preg_replace("/%$name/", $value, $command);
       }
+
+      /* If there are still some %.. in our command, try to fill these with some other class vars */
+      if(preg_match("/%/",$command)){
+        $attrs = get_object_vars($this);
+        foreach($attrs as $name => $value){
+          if(!is_string($value)) continue;
+          $command= preg_replace("/%$name/", $value, $command);
+        }
+      }
+
       if (check_command($command)){
         @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
             $command, "Execute");