mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
make it much easier to debug friend acceptance issues
by reporting specific error conditions across the wire.
This commit is contained in:
parent
e23ec64c90
commit
0ddfdce6a4
3 changed files with 147 additions and 108 deletions
12
boot.php
12
boot.php
|
@ -500,14 +500,18 @@ function goaway($s) {
|
|||
}}
|
||||
|
||||
// Generic XML return
|
||||
// Outputs a basic XML status structure to STDOUT, with a value variable
|
||||
// of $st and terminates the current process.
|
||||
// Outputs a basic dfrn XML status structure to STDOUT, with a <status> variable
|
||||
// of $st and an optional text <message> of $message and terminates the current process.
|
||||
|
||||
if(! function_exists('xml_status')) {
|
||||
function xml_status($st) {
|
||||
function xml_status($st, $message = '') {
|
||||
|
||||
if(strlen($message))
|
||||
$xml_message = "\t<message>" . xmlify($message) . "</message>\r\n";
|
||||
|
||||
header( "Content-type: text/xml" );
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\r\n";
|
||||
echo "<result><status>$st</status></result>\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