index b08a8b5c192904af77841bfc42d9d86e9b0ab95b..b8e01fa84e79b60822ac5bc8f2557217f6b3a31b 100644 (file)
}
- /*! \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())
{
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);
}
}