Skip to content

Commit

Permalink
MDL-12300 message window does show date now, merged from 19
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome committed May 8, 2008
1 parent 2253a29 commit 54d8f80
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions lang/en_utf8/langconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$string['strftimedate'] = '%%d %%B %%Y';
$string['strftimedateshort'] = '%%d %%B';
$string['strftimedatetime'] = '%%d %%B %%Y, %%I:%%M %%p';
$string['strftimedatetimeshort'] = '%%d/%%m/%%y, %%H:%%M';
$string['strftimedaydate'] = '%%A, %%d %%B %%Y';
$string['strftimedaydatetime'] = '%%A, %%d %%B %%Y, %%I:%%M %%p';
$string['strftimedayshort'] = '%%A, %%d %%B';
Expand Down
2 changes: 1 addition & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5152,7 +5152,7 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) {
'parentlanguage', 'strftimedate', 'strftimedateshort', 'strftimedatetime',
'strftimedaydate', 'strftimedaydatetime', 'strftimedayshort', 'strftimedaytime',
'strftimemonthyear', 'strftimerecent', 'strftimerecentfull', 'strftimetime',
'thischarset', 'thisdirection', 'thislanguage');
'thischarset', 'thisdirection', 'thislanguage', 'strftimedatetimeshort');

$filetocheck = 'langconfig.php';
$defaultlang = 'en_utf8';
Expand Down
8 changes: 4 additions & 4 deletions message/discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@

if ($messages = get_records_select('message_read', "(useridto = '$USER->id' AND useridfrom = '$userid' AND timeread > '$start' $lastsql) OR (useridto = '$userid' AND useridfrom = '$USER->id' AND timeread > '$start' $lastsql)")) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedaytime'));

$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
if ($message->useridfrom == $USER->id) {
$fullname = $mefullname;
} else {
Expand All @@ -223,7 +223,7 @@

if ($messages = get_records_select('message', "useridto = '$userid' AND useridfrom = '$USER->id' $lastsql")) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedaytime'));
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));

$printmessage = format_text($message->message, $message->format, $options, 0);
$printmessage = '<div class="message other"><span class="author">'.$mefullname.'</span> '.
Expand All @@ -241,7 +241,7 @@

if ($messages = get_records_select('message', "useridto = '$USER->id' AND useridfrom = '$userid' $lastsql")) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedaytime'));
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));

$printmessage = format_text($message->message, $message->format, $options, 0);
$printmessage = '<div class="message other"><span class="author">'.$userfullname.'</span> '.
Expand Down
4 changes: 2 additions & 2 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function message_print_search_results($frm) {
echo "</tr>\n";

$blockedcount = 0;
$dateformat = get_string('strftimedatetime');
$dateformat = get_string('strftimedatetimeshort');
$strcontext = get_string('context', 'message');
foreach ($messages as $message) {

Expand Down Expand Up @@ -910,7 +910,7 @@ function message_format_message(&$message, &$user, $format='', $keywords='', $cl
if ($format) {
$dateformat = $format;
} else {
$format = get_string('strftimedaytime');
$format = get_string('strftimedatetimeshort');
}
}
$time = userdate($message->timecreated, $dateformat);
Expand Down
2 changes: 1 addition & 1 deletion message/refresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if ($messages = get_records_select('message', "useridto = '$USER->id' AND useridfrom = '$userid'",
'timecreated')) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedaytime'));
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));

$options = new object();
$options->para = false;
Expand Down
2 changes: 1 addition & 1 deletion message/send.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
$options->newlines = true;
$message = format_text($message, $format, $options);

$time = userdate(time(), get_string('strftimedaytime'));
$time = userdate(time(), get_string('strftimedatetimeshort'));
$message = '<div class="message me"><span class="author">'.fullname($USER).'</span> '.
'<span class="time">['.$time.']</span>: '.
'<span class="content">'.$message.'</span></div>';
Expand Down

0 comments on commit 54d8f80

Please sign in to comment.