X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/a89937ec79577fd78af6fe40450ca53dd2d3604f..f988982ad609256e3bbbb8a41ca7c7b0b3b4fb74:/widget/reply.php diff --git a/widget/reply.php b/widget/reply.php index 3a16e2c..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"; } } @@ -37,14 +43,16 @@ while ($row = $query->fetch()) { print "\n"; } -print '
  • '; -print '
    '; -printf(''."\n", - 'reply', - "Bericht van {$User->login}", - '' -); -print ''."\n"; -print "
  • \n"; +if ($User) { + print '
  • '; + print '
    '; + printf(''."\n", + 'reply', + "Bericht van {$User->login}", + '' + ); + print ''."\n"; + print "
  • \n"; +} print "\n\n";