Skip to content

Commit

Permalink
Replaced strftime with COM_getUserDateTimeFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 10, 2017
1 parent ef5b7de commit 55925db
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions system/lib-comment.php
Expand Up @@ -306,8 +306,9 @@ function CMT_getComment(&$comments, $mode, $type, $order, $delete_option = false
$editName = DB_getItem($_TABLES['users'], 'username', "uid={$B['uid']}");
}
// add edit info to text
list($date, ) = COM_getUserDateTimeFormat($B['time'], 'date');
$A['comment'] .= '<div class="comment-edit">' . $LANG03[30] . ' '
. strftime($_CONF['date'], $B['time']) . ' '
. $date . ' '
. $LANG03[31] . ' ' . $editName
. '</div><!-- /COMMENTEDIT -->';
}
Expand Down Expand Up @@ -419,7 +420,8 @@ function CMT_getComment(&$comments, $mode, $type, $order, $delete_option = false
$template->set_var('parent_link', '');
}

$template->set_var('date', strftime($_CONF['date'], $A['nice_date']));
list($date, ) = COM_getUserDateTimeFormat($A['nice_date'], 'date');
$template->set_var('date', $date);
$template->set_var('sid', $A['sid']);
$template->set_var('type', $A['type']);

Expand Down Expand Up @@ -1884,8 +1886,9 @@ function CMT_prepareText($comment, $postMode, $type, $edit = false, $cid = null)
}

if ($edit) {
list($date, ) = COM_getUserDateTimeFormat(time(), 'date');
$comment .= '<div class="comment-edit">' . $LANG03[30] . ' '
. strftime($_CONF['date'], time()) . ' ' . $LANG03[31] . ' '
. $date . ' ' . $LANG03[31] . ' '
. $_USER['username'] . '</div><!-- /COMMENTEDIT -->';
}

Expand Down

0 comments on commit 55925db

Please sign in to comment.