Skip to content

Commit

Permalink
MDL-33139 forum: indicate which user's post was edited
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen committed May 24, 2012
1 parent 4f7f2a8 commit c2c071a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions mod/forum/lang/en/forum.php
Expand Up @@ -137,6 +137,7 @@
$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';
Expand Down
8 changes: 7 additions & 1 deletion mod/forum/post.php
Expand Up @@ -647,7 +647,13 @@
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;
Expand Down

0 comments on commit c2c071a

Please sign in to comment.