mirror of
https://github.com/friendica/friendica
synced 2025-04-27 03:10:12 +00:00
DFRN: Improved delivery status handling
This commit is contained in:
parent
0abdb26507
commit
791fc1d8b3
3 changed files with 32 additions and 19 deletions
|
@ -372,14 +372,22 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
|
|||
|
||||
function xml_status($st, $message = '') {
|
||||
|
||||
$xml_message = ((strlen($message)) ? "\t<message>" . xmlify($message) . "</message>\r\n" : '');
|
||||
$result = array('status' => $st);
|
||||
|
||||
if ($st)
|
||||
if ($message != '') {
|
||||
$result['message'] = $message;
|
||||
}
|
||||
|
||||
if ($st) {
|
||||
logger('xml_status returning non_zero: ' . $st . " message=" . $message);
|
||||
}
|
||||
|
||||
header("Content-type: text/xml");
|
||||
|
||||
$xmldata = array("result" => $result);
|
||||
|
||||
echo xml::from_array($xmldata, $xml);
|
||||
|
||||
header( "Content-type: text/xml" );
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\r\n";
|
||||
echo "<result>\r\n\t<status>$st</status>\r\n$xml_message</result>\r\n";
|
||||
killme();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue