summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/model/issue.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/app/model/issue.php b/app/model/issue.php
index 4300bbb..0954ad9 100644
--- a/app/model/issue.php
+++ b/app/model/issue.php
@@ -23,7 +23,7 @@ if (isAction("iss-mesg-add"))
{
$form = new form();
$form->text("issue");
- $form->text("mesg");
+ $form->text("mesg", false);
if (!$form->populate(input()))
return;
@@ -36,16 +36,19 @@ if (isAction("iss-mesg-add"))
return;
}
- if (!$user->canCreateSub($issue))
+ if (isset($form->mesg) && $form->mesg != "")
{
- logError(ERROR, "You do not have permission to post to this issue");
- return;
- }
+ if (!$user->canCreateSub($issue))
+ {
+ logError(ERROR, "You do not have permission to post to this issue");
+ return;
+ }
- $mesg = mesg::initNew($form->mesg, $user, $issue);
+ $mesg = mesg::initNew($form->mesg, $user, $issue);
- if ($mesg->setAttachment("attachment"))
- logError(NOTICE, "Saved attachment " . $mesg->attachment);
+ if ($mesg->setAttachment("attachment"))
+ logError(NOTICE, "Saved attachment " . $mesg->attachment);
+ }
if (isset(input()['closeIssue']))
{