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'; ...@@ -72,7 +72,7 @@ $string['edittitle'] = 'Edit forum';
$string['edittopic'] = 'Edit topic'; $string['edittopic'] = 'Edit topic';
$string['edittopicsuccess'] = 'Topic edited successfully'; $string['edittopicsuccess'] = 'Topic edited successfully';
$string['forumname'] = 'Forum Name'; $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> <div style=\"margin: 1em 0;\">%s</div>
...@@ -80,8 +80,7 @@ $string['forumposthtmltemplate'] = "<div style=\"padding: 0.5em 0; border-bottom ...@@ -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\">Reply to this post online</a></p>
<p><a href=\"%s\">Unsubscribe from this %s</a></p> <p><a href=\"%s\">Unsubscribe from this %s</a></p>
</div>"; </div>";
$string['forumposttemplate'] = "%s by %s $string['forumposttemplate'] = "Forum: %s (%s)
%s
------------------------------------------------------------------------ ------------------------------------------------------------------------
%s %s
......
...@@ -827,10 +827,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin { ...@@ -827,10 +827,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$post = $this->temp->post; $post = $this->temp->post;
$unsubscribeid = $post->{$user->subscribetype . 'id'}; $unsubscribeid = $post->{$user->subscribetype . 'id'};
$unsubscribelink = get_config('wwwroot') . 'interaction/forum/unsubscribe.php?' . $user->subscribetype . '=' . $unsubscribeid . '&key=' . $user->unsubscribekey; $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', 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), $cleanforumname,
display_name($post->poster, $user), $cleangroupname,
$post->posttime,
$post->textbody, $post->textbody,
get_config('wwwroot') . $this->url, get_config('wwwroot') . $this->url,
$user->subscribetype, $user->subscribetype,
...@@ -842,10 +843,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin { ...@@ -842,10 +843,11 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$post = $this->temp->post; $post = $this->temp->post;
$unsubscribeid = $post->{$user->subscribetype . 'id'}; $unsubscribeid = $post->{$user->subscribetype . 'id'};
$unsubscribelink = get_config('wwwroot') . 'interaction/forum/unsubscribe.php?' . $user->subscribetype . '=' . $unsubscribeid . '&key=' . $user->unsubscribekey; $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', 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)), $cleanforumname,
hsc(display_name($post->poster, $user)), $cleangroupname,
$post->posttime,
$post->htmlbody, $post->htmlbody,
get_config('wwwroot') . $this->url, get_config('wwwroot') . $this->url,
$unsubscribelink, $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