Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d388e75b
Commit
d388e75b
authored
May 03, 2010
by
Richard Mansfield
Browse files
Don't show header in internal forum post notifications
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
82519cc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/interaction/forum/lib.php
View file @
d388e75b
...
@@ -502,6 +502,9 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
...
@@ -502,6 +502,9 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$textbody
=
trim
(
html2text
(
$post
->
body
));
$textbody
=
trim
(
html2text
(
$post
->
body
));
$postlink
=
get_config
(
'wwwroot'
)
.
'interaction/forum/topic.php?id='
.
$post
->
topicid
.
'#post'
.
$this
->
postid
;
$postlink
=
get_config
(
'wwwroot'
)
.
'interaction/forum/topic.php?id='
.
$post
->
topicid
.
'#post'
.
$this
->
postid
;
$this
->
message
=
$textbody
;
$this
->
url
=
$postlink
;
foreach
(
$this
->
users
as
&
$user
)
{
foreach
(
$this
->
users
as
&
$user
)
{
$lang
=
(
empty
(
$user
->
lang
)
||
$user
->
lang
==
'default'
)
?
get_config
(
'lang'
)
:
$user
->
lang
;
$lang
=
(
empty
(
$user
->
lang
)
||
$user
->
lang
==
'default'
)
?
get_config
(
'lang'
)
:
$user
->
lang
;
if
(
$post
->
parent
)
{
if
(
$post
->
parent
)
{
...
@@ -515,7 +518,7 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
...
@@ -515,7 +518,7 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$unsubscribeid
=
$post
->
{
$type
.
'id'
};
$unsubscribeid
=
$post
->
{
$type
.
'id'
};
$unsubscribelink
=
get_config
(
'wwwroot'
)
.
'interaction/forum/unsubscribe.php?'
.
$type
.
'='
.
$unsubscribeid
.
'&key='
.
$subscribers
[
$user
->
id
]
->
key
;
$unsubscribelink
=
get_config
(
'wwwroot'
)
.
'interaction/forum/unsubscribe.php?'
.
$type
.
'='
.
$unsubscribeid
.
'&key='
.
$subscribers
[
$user
->
id
]
->
key
;
$user
->
message
=
get_string_from_language
(
$lang
,
'forumposttemplate'
,
'interaction.forum'
,
$user
->
email
message
=
get_string_from_language
(
$lang
,
'forumposttemplate'
,
'interaction.forum'
,
$post
->
subject
?
$post
->
subject
:
get_string_from_language
(
$lang
,
're'
,
'interaction.forum'
,
$post
->
topicsubject
),
$post
->
subject
?
$post
->
subject
:
get_string_from_language
(
$lang
,
're'
,
'interaction.forum'
,
$post
->
topicsubject
),
display_name
(
$post
->
poster
,
$user
),
display_name
(
$post
->
poster
,
$user
),
$posttime
,
$posttime
,
...
@@ -540,10 +543,6 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
...
@@ -540,10 +543,6 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
return
$user
->
subject
;
return
$user
->
subject
;
}
}
public
function
get_message
(
$user
)
{
return
$user
->
message
;
}
public
function
get_plugintype
(){
public
function
get_plugintype
(){
return
'interaction'
;
return
'interaction'
;
}
}
...
...
htdocs/notification/email/lib.php
View file @
d388e75b
...
@@ -37,7 +37,12 @@ class PluginNotificationEmail extends PluginNotification {
...
@@ -37,7 +37,12 @@ class PluginNotificationEmail extends PluginNotification {
if
(
!
empty
(
$data
->
overridemessagecontents
))
{
if
(
!
empty
(
$data
->
overridemessagecontents
))
{
$subject
=
$data
->
subject
;
$subject
=
$data
->
subject
;
$messagebody
=
$data
->
message
;
if
(
!
empty
(
$user
->
emailmessage
))
{
$messagebody
=
$user
->
emailmessage
;
}
else
{
$messagebody
=
$data
->
message
;
}
if
(
!
empty
(
$user
->
htmlmessage
))
{
if
(
!
empty
(
$user
->
htmlmessage
))
{
$messagehtml
=
$user
->
htmlmessage
;
$messagehtml
=
$user
->
htmlmessage
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment