X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FMagic.php;h=491ed31cbd4a4bd0c24036ea45a398325d078251;hb=f3da5b3a2f98883e4a06c345dfe2880394f7d21d;hp=694af23208fb025d3b74266272def9ab560748bf;hpb=e88781164a2e60c439c755d96a639ef2093a7305;p=friendica.git diff --git a/src/Module/Magic.php b/src/Module/Magic.php index 694af23208..491ed31cbd 100644 --- a/src/Module/Magic.php +++ b/src/Module/Magic.php @@ -28,10 +28,10 @@ class Magic extends BaseModule Logger::log('args: ' . print_r($_REQUEST, true), Logger::DATA); - $addr = ((x($_REQUEST, 'addr')) ? $_REQUEST['addr'] : ''); - $dest = ((x($_REQUEST, 'dest')) ? $_REQUEST['dest'] : ''); - $test = ((x($_REQUEST, 'test')) ? intval($_REQUEST['test']) : 0); - $owa = ((x($_REQUEST, 'owa')) ? intval($_REQUEST['owa']) : 0); + $addr = defaults($_REQUEST, 'addr', ''); + $dest = defaults($_REQUEST, 'dest', ''); + $test = (!empty($_REQUEST['test']) ? intval($_REQUEST['test']) : 0); + $owa = (!empty($_REQUEST['owa']) ? intval($_REQUEST['owa']) : 0); // NOTE: I guess $dest isn't just the profile url (could be also // other profile pages e.g. photo). We need to find a solution @@ -74,7 +74,7 @@ class Magic extends BaseModule $basepath = $exp[0]; $headers = []; - $headers['Accept'] = 'application/x-dfrn+json'; + $headers['Accept'] = 'application/x-dfrn+json, application/x-zot+json'; $headers['X-Open-Web-Auth'] = Strings::getRandomHex(); // Create a header that is signed with the local users private key.