mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
die forcefully but gracefully on missing api templates
This commit is contained in:
parent
759f36e7e8
commit
b3b0a9de24
4 changed files with 66 additions and 61 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue