diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-06-25 14:38:21 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-06-25 14:38:21 -0700 |
commit | a81770aaefdca11c2063df0edeeceb0e3a9a6c14 (patch) | |
tree | c7cbe8a7512ded0d201a8e706574a2086823f2b3 /controllers/micropub.php | |
parent | a4ff16b928ca1bcfc2eb0b7ba9363ff441a91882 (diff) |
fix backwards resolution
Diffstat (limited to 'controllers/micropub.php')
-rw-r--r-- | controllers/micropub.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/micropub.php b/controllers/micropub.php index 8a4440c..70bfc44 100644 --- a/controllers/micropub.php +++ b/controllers/micropub.php @@ -26,7 +26,7 @@ $app->post('/micropub/post', function() use($app) { $app->response()->body(json_encode(array( 'request' => htmlspecialchars($r['request']), 'response' => htmlspecialchars($r['response']), - 'location' => (isset($r['location']) ? Mf2\resolveUrl($r['location'], $user->micropub_endpoint) : null), + 'location' => (isset($r['location']) ? Mf2\resolveUrl($user->micropub_endpoint, $r['location']) : null), 'error' => $r['error'], 'curlinfo' => $r['curlinfo'] ))); @@ -69,7 +69,7 @@ $app->post('/micropub/multipart', function() use($app) { $app->response()['Content-type'] = 'application/json'; $app->response()->body(json_encode(array( 'response' => (isset($r['response']) ? htmlspecialchars($r['response']) : null), - 'location' => (isset($r['location']) ? Mf2\resolveUrl($r['location'], $user->micropub_endpoint) : null), + 'location' => (isset($r['location']) ? Mf2\resolveUrl($user->micropub_endpoint, $r['location']) : null), 'error' => (isset($r['error']) ? $r['error'] : null), ))); } |