X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/00480c926f002a6bbc7ebd742e8450bc1b1a6f9d..e64861a7760cfe34596e193a6a3ed2ef39b25892:/widget/reply.php diff --git a/widget/reply.php b/widget/reply.php index d305fc7..1f6d0e2 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -60,9 +60,16 @@ if ($_POST) { $Issue = $updated; } } + + if ($Page->api) { + abort("/{$Page->link}", '200 reply success'); + } $_POST['reply'] = NULL; } catch (Exception $e) { + if ($Page->api) { + abort(ucfirst($e->getMessage()), '500 reply error'); + } print "

Antwoord niet opgeslagen: {$e->getMessage()}.

\n\n"; } } @@ -139,7 +146,9 @@ if ($User->login) { '' ); print ''."\n"; - print "\n"; + print ""; + print ''; + print "\n"; } print "\n\n";