$args = array();
}
- $c = preg_replace('/%%arg.(\w+)%%/', "{$args['\\1']}", $c);
+ // XXX: not very efficient
+
+ foreach ($args as $name => $value) {
+ $c = preg_replace('/%%arg.'.$name.'%%/', $value, $c);
+ }
+
$c = preg_replace('/%%user.(\w+)%%/e', "common_user_property('\\1')", $c);
$c = preg_replace('/%%action.(\w+)%%/e', "common_local_url('\\1')", $c);
$c = preg_replace('/%%doc.(\w+)%%/e', "common_local_url('doc', array('title'=>'\\1'))", $c);