aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-10 16:16:29 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-10 16:16:29 -0700
commit0ddfdce6a4c83278a481a07916bc11240fc4b6d0 (patch)
treecff2b13d9f0645b8ff7f0d292ab4f626737c6edf /boot.php
parente23ec64c90382ec156ab061d478fa592789ab1ab (diff)
downloadvolse-hubzilla-0ddfdce6a4c83278a481a07916bc11240fc4b6d0.tar.gz
volse-hubzilla-0ddfdce6a4c83278a481a07916bc11240fc4b6d0.tar.bz2
volse-hubzilla-0ddfdce6a4c83278a481a07916bc11240fc4b6d0.zip
make it much easier to debug friend acceptance issues
by reporting specific error conditions across the wire.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index 8e42c5fad..640c0199f 100644
--- a/boot.php
+++ b/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();
}}