File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,10 @@ function wasGuestOrHost(string $relations) {
168
168
<a href="/members/<?= $ this ->member ->Username ;?> /comment/<?php echo $ comment ->id ;?> /report" title="<?= $ words ->getSilent ('ReportCommentProblem ' ) ?> "
169
169
class="float-left gray align-self-center"><i class="fa fa-flag" alt="<?= $ words ->getSilent ('ReportCommentProblem ' ) ?> "></i></a>
170
170
<?php } ?>
171
- <?php }?>
171
+ <?php }
172
+ if (null !== $ comment ->updated && $ comment ->created !== $ comment ->updated ){ ?>
173
+ <p class="small"><?= $ words ->get ('CommentLastUpdated ' )?> : <span title="<?= $ comment ->updated ; ?> "><?= (new Carbon ($ comment ->updated ))->diffForHumans (); ?> </span></p>
174
+ <?php } ?>
172
175
</div>
173
176
</div>
174
177
</div>
@@ -239,6 +242,9 @@ class="align-self-center float-right"><button class="o-button"><?= $addCommentTr
239
242
<?php if ($ loggedIn === $ comment ->UsernameToMember ) { ?>
240
243
<a href="/members/<?= $ this ->member ->Username ;?> /comment/<?php echo $ comment ->id ;?> /report" title="<?= $ words ->getSilent ('ReportCommentProblem ' ) ?> " class="float-right gray align-self-center">
241
244
<i class="fa fa-flag" alt="<?= $ words ->getSilent ('ReportCommentProblem ' ) ?> "></i></a>
245
+ <?php }
246
+ if (null !== $ comment ->updated && $ comment ->created !== $ comment ->updated ){ ?>
247
+ <p class="small"><?= $ words ->get ('CommentLastUpdated ' )?> : <span title="<?= $ comment ->updated ; ?> "><?= (new Carbon ($ comment ->updated ))->diffForHumans (); ?> </span></p>
242
248
<?php } ?>
243
249
</div>
244
250
</div>
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ public function addComment(
149
149
$ comment = $ form ->getData ();
150
150
$ comment ->setToMember ($ member );
151
151
$ comment ->setFromMember ($ loggedInMember );
152
+ if (CommentQualityType::NEGATIVE === $ comment ->getQuality ()) {
153
+ $ comment ->setAdminAction (CommentAdminActionType::ADMIN_CHECK );
154
+ }
152
155
$ entityManager ->persist ($ comment );
153
156
154
157
// Mark comment guidelines as read and hide the checkbox for the future
@@ -201,7 +204,7 @@ public function editComment(
201
204
}
202
205
203
206
if ($ comment ->getQuality () == CommentQualityType::NEGATIVE && !$ comment ->getEditingAllowed ()) {
204
- $ this ->addTranslatedFlash ('comment.editing.not.allowed ' , []);
207
+ $ this ->addTranslatedFlash ('notice ' , ' comment.editing.not.allowed ' , []);
205
208
206
209
return $ this ->redirectToRoute ('members_profile ' , ['username ' => $ member ->getUsername ()]);
207
210
}
@@ -236,6 +239,10 @@ public function editComment(
236
239
$ comment ->setUpdated (new DateTime ());
237
240
}
238
241
242
+ if (CommentQualityType::NEGATIVE === $ comment ->getQuality ()) {
243
+ $ comment ->setAdminAction (CommentAdminActionType::ADMIN_CHECK );
244
+ }
245
+
239
246
$ entityManager ->persist ($ comment );
240
247
$ entityManager ->flush ();
241
248
You can’t perform that action at this time.
0 commit comments