diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-10 16:16:29 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-10 16:16:29 -0700 |
commit | 0ddfdce6a4c83278a481a07916bc11240fc4b6d0 (patch) | |
tree | cff2b13d9f0645b8ff7f0d292ab4f626737c6edf /boot.php | |
parent | e23ec64c90382ec156ab061d478fa592789ab1ab (diff) | |
download | volse-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.php | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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(); }} |