Code

Made listing headers w3c conform.
[gosa.git] / gosa-core / include / class_plugin.inc
index b08a8b5c192904af77841bfc42d9d86e9b0ab95b..b8e01fa84e79b60822ac5bc8f2557217f6b3a31b 100644 (file)
@@ -1998,8 +1998,8 @@ class plugin
   }
 
 
-  /*! \brief    Forward command execution request
-   *             to the correct method. 
+  /*! \brief    Forward command execution requests
+   *             to the hook execution method. 
    */
   function handle_post_events($mode, $addAttrs= array())
   {
@@ -2060,7 +2060,18 @@ class plugin
       if(preg_match("/%/",$command)){
         $attrs = get_object_vars($plugin);
         foreach($attrs as $name => $value){
-          if(!is_string($value)) continue;
+          if(is_array($value)){
+            $s = "";
+            foreach($value as $val){
+              if(is_string($val) || is_int($val) || is_float($val) || is_bool($val)){
+                $s .= '"'.$val.'",'; 
+              }
+            }
+            $value = '['.trim($s,',').']';
+          }
+          if(!is_string($value) && !is_int($value) && !is_float($value) && !is_bool($value)){
+            continue;
+          }
           $command= preg_replace("/%$name/", $value, $command);
         }
       }