summaryrefslogtreecommitdiff
path: root/app/Template/notification
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-21 16:02:22 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-21 16:02:22 -0400
commit1465ca1ae1510cd399b8f408ce7bf8058ed26955 (patch)
tree3343bee9300c6a9edad677067b39b9d58395324d /app/Template/notification
parent9b78126289703b222a19dcd1fcc16bca66993c20 (diff)
Fix issue in notification template when there is no comment author
Diffstat (limited to 'app/Template/notification')
-rw-r--r--app/Template/notification/comment_create.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Template/notification/comment_create.php b/app/Template/notification/comment_create.php
index 747c4f43..2f2c0fa6 100644
--- a/app/Template/notification/comment_create.php
+++ b/app/Template/notification/comment_create.php
@@ -1,6 +1,10 @@
<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
-<h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
+<?php if (! empty($comment['username'])): ?>
+ <h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
+<?php else: ?>
+ <h3><?= t('New comment') ?></h3>
+<?php endif ?>
<?= $this->text->markdown($comment['comment']) ?>