summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/classes/wizard_api.php')
-rw-r--r--frontend/classes/wizard_api.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/classes/wizard_api.php b/frontend/classes/wizard_api.php
index f4c672e..46814b5 100644
--- a/frontend/classes/wizard_api.php
+++ b/frontend/classes/wizard_api.php
@@ -413,14 +413,14 @@ class wizard_layered_checkbox_array extends wizard_checkbox_array {
}
private function format_label(&$array, $label='%p', $path, $name) {
$arg=$array;
- $label=str_replace(array('%p', '%n'), array($path, $name), $label);
+ $out=str_replace(array('%p', '%n'), array($path, $name), $label);
if (strpos($label, '$')) {
while (is_array(current($arg))) {
$arg=current($arg);
}
- $label=eval("extract(\$arg, EXTR_PREFIX_INVALID, 'var_');\nreturn <<<_XQ1\n$label\n_XQ1;\n");
+ $out=eval("extract(\$arg, EXTR_PREFIX_INVALID, 'var_');\n".(strpos($label, 'return')===0?$out:"return <<<_XQ1\n$out\n_XQ1").";\n");
}
- return htmlentities($label);
+ return strpos($label, 'return')===0?$out:htmlentities($out);
}
private static function b36($n) {
return base_convert($n, 10, 36);