diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/api.php | 10 | ||||
-rw-r--r-- | include/text.php | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/include/api.php b/include/api.php index 1334d8eae..d94cc2942 100644 --- a/include/api.php +++ b/include/api.php @@ -404,14 +404,6 @@ return $ret; } - /** - * apply xmlify() to all values of array $val, recursively - */ - function api_xmlify($val){ - if (is_bool($val)) return $val?"true":"false"; - if (is_array($val)) return array_map('api_xmlify', $val); - return xmlify((string) $val); - } /** * load api $templatename for $type and replace $data array @@ -424,7 +416,7 @@ case "atom": case "rss": case "xml": - $data = api_xmlify($data); + $data = array_xmlify($data); $tpl = get_markup_template("api_".$templatename."_".$type.".tpl"); $ret = replace_macros($tpl, $data); break; diff --git a/include/text.php b/include/text.php index e0f38a3a0..8ada179dc 100644 --- a/include/text.php +++ b/include/text.php @@ -1052,4 +1052,13 @@ function html2bb_video($s) { '[vimeo]$2[/vimeo]', $s); return $s; -}
\ No newline at end of file +} + +/** + * apply xmlify() to all values of array $val, recursively + */ +function array_xmlify($val){ + if (is_bool($val)) return $val?"true":"false"; + if (is_array($val)) return array_map('array_xmlify', $val); + return xmlify((string) $val); +} |