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
c732c134
Commit
c732c134
authored
Jan 24, 2007
by
Richard Mansfield
Browse files
Don't notify blogpost owners of feedback when blog has commentsnotify
turned off
parent
d8539951
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/activity.php
View file @
c732c134
...
...
@@ -180,11 +180,15 @@ function handle_activity($activitytype, $data, $cron=false) {
}
if
(
!
empty
(
$data
->
artefact
))
{
// feedback on artefact
$data
->
subject
=
get_string
(
'newfeedbackonartefact'
,
'activity'
);
if
(
!
$artefact
=
get_record
(
'artefact'
,
'id'
,
$data
->
artefact
))
{
throw
new
InvalidArgumentException
(
"Couldn't find artefact with id "
.
$data
->
artefact
);
require_once
(
'artefact.php'
);
$artefact
=
artefact_instance_from_id
(
$data
->
artefact
);
if
(
$artefact
->
feedback_notify_owner
())
{
$userid
=
$artefact
->
get
(
'owner'
);
}
$userid
=
$artefact
->
owner
;
$data
->
subject
.
=
' '
.
$artefact
->
title
;
else
{
$userid
=
null
;
}
$data
->
subject
.
=
' '
.
$artefact
->
get
(
'title'
);
if
(
empty
(
$data
->
url
))
{
// @todo this might change later
$data
->
url
=
get_config
(
'wwwroot'
)
.
'view/view.php?artefact='
...
...
@@ -203,7 +207,12 @@ function handle_activity($activitytype, $data, $cron=false) {
$data
->
url
=
get_config
(
'wwwroot'
)
.
'view/view.php?view='
.
$data
->
view
;
}
}
$users
=
activity_get_users
(
$activitytype
->
name
,
array
(
$userid
));
if
(
$userid
)
{
$users
=
activity_get_users
(
$activitytype
->
name
,
array
(
$userid
));
}
else
{
$users
=
array
();
}
break
;
// and now the harder ones
case
'watchlist'
:
...
...
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