]> git.mxchange.org Git - friendica.git/blobdiff - mod/receive.php
Move forbidden_nicknames default to config file
[friendica.git] / mod / receive.php
index 41f2225cb4d3a54b4f072d13eedb509f7b434d69..adb758e384451386158d16727b1717b23fb26233 100644 (file)
@@ -43,9 +43,7 @@ function receive_post(App $a)
 
        logger('mod-diaspora: receiving post', LOGGER_DEBUG);
 
-       $xml = urldecode($_POST['xml']);
-
-       if (!$xml) {
+       if (empty($_POST['xml'])) {
                $postdata = file_get_contents("php://input");
                if ($postdata == '') {
                        System::httpExit(500);
@@ -54,6 +52,8 @@ function receive_post(App $a)
                logger('mod-diaspora: message is in the new format', LOGGER_DEBUG);
                $msg = Diaspora::decodeRaw($importer, $postdata);
        } else {
+               $xml = urldecode($_POST['xml']);
+
                logger('mod-diaspora: decode message in the old format', LOGGER_DEBUG);
                $msg = Diaspora::decode($importer, $xml);