git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: ignore failed user setup during errors
[minimedit.git]
/
widget
/
reply.php
diff --git
a/widget/reply.php
b/widget/reply.php
index cedcc4919699194fe60926bf5a67adf316dfa38c..edffaa75ceb3b6bc9de79f34d79af2b4d94bff72 100644
(file)
--- a/
widget/reply.php
+++ b/
widget/reply.php
@@
-10,14
+10,15
@@
if ($_POST) {
require_once 'upload.inc.php';
try {
$html = messagehtml($_POST['reply']);
require_once 'upload.inc.php';
try {
$html = messagehtml($_POST['reply']);
- if ($_FILES and
isset
($_FILES['image'])) {
+ if ($_FILES and
!empty
($_FILES['image'])) {
$target = 'data/upload';
if (!file_exists($target)) {
throw new Exception("er is geen uploadmap aanwezig op $target");
}
$target .= '/' . $User->login;
$target = 'data/upload';
if (!file_exists($target)) {
throw new Exception("er is geen uploadmap aanwezig op $target");
}
$target .= '/' . $User->login;
- $result = userupload($_FILES['image'], $target);
- $html .= sprintf('<p><img src="/thumb/640x/%s" /></p>', $result);
+ if ($result = userupload($_FILES['image'], $target)) {
+ $html .= sprintf('<p><img src="/thumb/640x/%s" /></p>', $result);
+ }
}
$query = $Db->set('comments', [
'page' => $Page,
}
$query = $Db->set('comments', [
'page' => $Page,
@@
-102,7
+103,7
@@
while ($row = $query->fetch()) {
print "</li>\n";
}
print "</li>\n";
}
-if ($User) {
+if ($User
->login
) {
print '<li>';
print '<form method="post" action="" enctype="multipart/form-data">';
if (isset($Issue) and $User->admin("edit $Page")) {
print '<li>';
print '<form method="post" action="" enctype="multipart/form-data">';
if (isset($Issue) and $User->admin("edit $Page")) {