Commit 152994b9 authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Add pseudoheaders to forums mail messages (bug 882894)"

parents 801c7b6d 93c012f2
......@@ -72,7 +72,7 @@ $string['edittitle'] = 'Edit forum';
$string['edittopic'] = 'Edit topic';
$string['edittopicsuccess'] = 'Topic edited successfully';
$string['forumname'] = 'Forum Name';
$string['forumposthtmltemplate'] = "<div style=\"padding: 0.5em 0; border-bottom: 1px solid #999;\"><strong>%s by %s</strong><br>%s</div>
$string['forumposthtmltemplate'] = "<div style=\"padding: 0.5em 0; border-bottom: 1px solid #999;\"><strong>Forum: %s (%s)</strong></div>
<div style=\"margin: 1em 0;\">%s</div>
......@@ -80,8 +80,7 @@ $string['forumposthtmltemplate'] = "<div style=\"padding: 0.5em 0; border-bottom
<p><a href=\"%s\">Reply to this post online</a></p>
<p><a href=\"%s\">Unsubscribe from this %s</a></p>
</div>";
$string['forumposttemplate'] = "%s by %s
%s
$string['forumposttemplate'] = "Forum: %s (%s)
------------------------------------------------------------------------
%s
......
......@@ -827,10 +827,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$post = $this->temp->post;
$unsubscribeid = $post->{$user->subscribetype . 'id'};
$unsubscribelink = get_config('wwwroot') . 'interaction/forum/unsubscribe.php?' . $user->subscribetype . '=' . $unsubscribeid . '&key=' . $user->unsubscribekey;
$cleanforumname = str_replace('"', "'", strip_tags($post->forumtitle));
$cleangroupname = str_replace('"', "'", strip_tags($post->groupname));
return get_string_from_language($user->lang, 'forumposttemplate', 'interaction.forum',
$post->subject ? $post->subject : get_string_from_language($user->lang, 're', 'interaction.forum', $post->topicsubject),
display_name($post->poster, $user),
$post->posttime,
$cleanforumname,
$cleangroupname,
$post->textbody,
get_config('wwwroot') . $this->url,
$user->subscribetype,
......@@ -842,10 +843,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$post = $this->temp->post;
$unsubscribeid = $post->{$user->subscribetype . 'id'};
$unsubscribelink = get_config('wwwroot') . 'interaction/forum/unsubscribe.php?' . $user->subscribetype . '=' . $unsubscribeid . '&key=' . $user->unsubscribekey;
$cleanforumname = str_replace('"', "'", clean_html($post->forumtitle));
$cleangroupname = str_replace('"', "'", clean_html($post->groupname));
return get_string_from_language($user->lang, 'forumposthtmltemplate', 'interaction.forum',
$post->subject ? hsc($post->subject) : get_string_from_language($user->lang, 're', 'interaction.forum', hsc($post->topicsubject)),
hsc(display_name($post->poster, $user)),
$post->posttime,
$cleanforumname,
$cleangroupname,
$post->htmlbody,
get_config('wwwroot') . $this->url,
$unsubscribelink,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment