X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/7c9537015a7361681323e5a5ce2f10d9c0ee42d3..f73f2c6c223577ad3cc6e14c0e6ff1567c910eae:/widget/reply.php diff --git a/widget/reply.php b/widget/reply.php index 0935567..0a0e4e5 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -4,6 +4,7 @@ require_once 'database.inc.php'; $journalcol = [ 'assign' => 'Toegewezen aan', + 'subject' => 'Onderwerp', ]; if ($_POST) { @@ -17,7 +18,14 @@ if ($_POST) { } $target .= '/' . $User->login; if ($result = userupload($_FILES['image'], $target)) { - $html .= sprintf('

', $result); + if (preg_match('(^image/)', $_FILES['image']['type'])) { + $html .= sprintf('

', $result); + } + else { + $html .= sprintf('

Bijgevoegd bestand: %s

', + $result, basename($result) + ); + } } } $query = $Db->set('comments', [