Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31636 Added strftimeformat to comment object being passed through…

… to xxx_comment_display() for further time format changes.
  • Loading branch information...
commit 6b969e14b5fe9fdc7b337fa2940fa97c8730ec78 1 parent 6c847bb
@nebgor nebgor authored damyon committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  comment/lib.php
View
3  comment/lib.php
@@ -526,6 +526,7 @@ public function get_comments($page = '') {
$c->content = $u->ccontent;
$c->format = $u->cformat;
$c->timecreated = $u->ctimecreated;
+ $c->strftimeformat = get_string('strftimerecent', 'langconfig');
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
$c->profileurl = $url->out(false);
$c->fullname = fullname($u);
@@ -793,7 +794,7 @@ public function print_comment($cmt, $nonjs = true) {
$replacements[] = $cmt->avatar;
$replacements[] = html_writer::link($cmt->profileurl, $cmt->fullname);
$replacements[] = $cmt->content;
- $replacements[] = userdate($cmt->timecreated, get_string('strftimerecent', 'langconfig'));
+ $replacements[] = userdate($cmt->timecreated, $cmt->strftimeformat);
// use html template to format a single comment.
return str_replace($patterns, $replacements, $this->template);
Please sign in to comment.
Something went wrong with that request. Please try again.