X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/f547127c637332119b42329ca78d0e1a659d9739..v5.0-26-g38cf6657d2:/widget/reply.php diff --git a/widget/reply.php b/widget/reply.php index d305fc7..0935567 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -60,9 +60,15 @@ if ($_POST) { $Issue = $updated; } } + + $target = "/{$Page->link}/$newcomment#$newcomment"; + abort($target, ($Page->api ? 200 : 303) . ' 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"; } } @@ -74,7 +80,7 @@ print '\n\n";