MDL-33139 forum: indicate which user's post was edited

This commit is contained in:
Charles Fulton 2012-05-21 05:39:27 -07:00
parent 4f7f2a8828
commit c2c071a274
2 changed files with 8 additions and 1 deletions

View File

@ -137,6 +137,7 @@ $string['displaystart_help'] = 'This setting specifies whether a forum post shou
$string['eachuserforum'] = 'Each person posts one discussion';
$string['edit'] = 'Edit';
$string['editedby'] = 'Edited by {$a->name} - original submission {$a->date}';
$string['editedpostupdated'] = '{$a}\'s post was updated';
$string['editing'] = 'Editing';
$string['emptymessage'] = 'Something was wrong with your post. Perhaps you left it blank, or the attachment was too big. Your changes have NOT been saved.';
$string['erroremptymessage'] = 'Post message cannot be empty';

View File

@ -647,7 +647,13 @@ if ($fromform = $mform_post->get_data()) {
if (!empty($message)) { // if we're printing stuff about the file upload
$timemessage = 4;
}
$message .= '<br />'.get_string("postupdated", "forum");
if ($realpost->userid == $USER->id) {
$message .= '<br />'.get_string("postupdated", "forum");
} else {
$realuser = $DB->get_record('user', array('id' => $realpost->userid));
$message .= '<br />'.get_string("editedpostupdated", "forum", fullname($realuser));
}
if ($subscribemessage = forum_post_subscription($fromform, $forum)) {
$timemessage = 4;