die forcefully but gracefully on missing api templates

This commit is contained in:
friendica 2013-01-23 17:07:55 -08:00
parent 759f36e7e8
commit b3b0a9de24
4 changed files with 66 additions and 61 deletions

View file

@ -450,6 +450,11 @@
case "xml":
$data = array_xmlify($data);
$tpl = get_markup_template("api_".$templatename."_".$type.".tpl");
if(! $tpl) {
header ("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n".'<status><error>not implemented</error></status>';
killme();
}
$ret = replace_macros($tpl, $data);
break;
case "json":