Commit 4094f91b authored by Melissa Draper's avatar Melissa Draper
Browse files

Add updated time information to feedback display (bug #906646)

The time was displayed as the created time, and no indication if the
comment had changed. This adds the modified time for the comment item
if it is more recent than the creation time.

Change-Id: Ie7790ef67d9c58414f98d9a2d65e043aa1783327
Signed-off-by: default avatarMelissa Draper <>
parent eea2e6be
......@@ -338,7 +338,7 @@ class ArtefactTypeComment extends ArtefactType {
$comments = get_records_sql_assoc('
SELECT,, a.authorname, a.ctime, a.description,,, a.authorname, a.ctime, a.mtime, a.description,
c.private, c.deletedby, c.requestpublic, c.rating,
u.username, u.firstname, u.lastname, u.preferredname,, u.staff, u.admin,
u.deleted, u.profileicon
......@@ -424,6 +424,9 @@ class ArtefactTypeComment extends ArtefactType {
foreach ($data->data as &$item) {
$item->ts = strtotime($item->ctime);
$item->date = format_date($item->ts, 'strftimedatetime');
if ($item->ts < strtotime($item->mtime)) {
$item->updated = format_date(strtotime($item->mtime), 'strftimedatetime');
$item->isauthor = $item->author && $item->author == $USER->get('id');
if (!empty($item->attachments)) {
if ($data->isowner) {
......@@ -48,7 +48,7 @@
{if $item->deletedmessage}
<span>{$item->deletedmessage} | </span>
<span class="date">{$item->date} </span>
<span class="date">{$item->date} {if $item->updated}[{str tag=Updated}: {$item->updated}]{/if}</span>
{if $item->pubmessage} | <span>{$item->pubmessage}</span>{/if}
{if $item->makepublicrequested} | <span>{str tag=youhaverequestedpublic section=artefact.comment}</span>{/if}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment