X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/4d7efe1c7eacff8a21bea95828ef0528a47f503e..f988982ad609256e3bbbb8a41ca7c7b0b3b4fb74:/widget/reply.php diff --git a/widget/reply.php b/widget/reply.php index cfa9487..abb364c 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -1,5 +1,5 @@ Reacties'."\n"; @@ -16,10 +16,16 @@ if ($_POST) { if (!$query->rowCount()) { throw new Exception('Fout bij opslaan'); } + if (@list ($cat, $issue) = explode('/', $Page) and ctype_digit($issue)) { + $Db->query( + 'UPDATE issues SET updated = now() WHERE page = ? AND id = ?', + [$cat, $issue] + ); + } $_POST['reply'] = NULL; } catch (Exception $e) { - print '

Antwoord niet opgeslagen.

'."\n\n"; + print "

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

\n\n"; } } @@ -27,7 +33,7 @@ $query = $Db->query('SELECT * FROM comments WHERE page = ? ORDER BY created', [$ print '\n\n";