]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12300 message window does show date now, merged from 19
authorjerome <jerome>
Thu, 8 May 2008 03:49:51 +0000 (03:49 +0000)
committerjerome <jerome>
Thu, 8 May 2008 03:49:51 +0000 (03:49 +0000)
lang/en_utf8/langconfig.php
lib/moodlelib.php
message/discussion.php
message/lib.php
message/refresh.php
message/send.php

index cfc066e302dabe06e73ed285bffd572ee4b3fdad..d5f3d9f5c12b509ff7476a0623cba757aa324d2b 100644 (file)
@@ -14,6 +14,7 @@ $string['oldcharset'] = 'ISO-8859-1';
 $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';
index 39267996a0611dcf9738c4cceb18b2392a1335b2..cfec8ba19ed3d653d9088a98a1fa9d94051bab00 100644 (file)
@@ -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';
index b4b66082672681847f1554efe6443289e56edc09..bd067dc43da952ee793f0ca50222bb37d942c824 100644 (file)
 
     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 {
 
     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> '.
 
     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> '.
index b36a6526d92d8acb31ca66ae1eb42b95ae8a80eb..984ae798b3b244cb7ed23298402c4b9e55855c78 100644 (file)
@@ -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) {
 
@@ -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);
index 891055413b71bed1aaea4cc2f89827507c8528f4..35d8988cd6b8cb800bfca2bca219ddc8c21968d1 100644 (file)
@@ -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;
index 4c79804779baf83b0c6cd1c40c489c25334d6cd2..290425e59bea2637ffe088113017b7d9e24ff0ea 100644 (file)
@@ -74,7 +74,7 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
         $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>';