summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3939699)
raw | patch | inline | side by side (parent: 3939699)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Mar 2010 08:55:35 +0000 (08:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Mar 2010 08:55:35 +0000 (08:55 +0000) |
- We can now use nearly every placeholder we want
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15878 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15878 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history |
index b08a8b5c192904af77841bfc42d9d86e9b0ab95b..eb21b5e0fcf40886bd6c9e00371efec0e9af8a87 100644 (file)
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);
}
}