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
669486de
Commit
669486de
authored
Jan 29, 2007
by
Penny Leach
Browse files
added one last case to the watchlist activity stuff, documented the
giant query
parent
98067fd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/activity.php
View file @
669486de
...
...
@@ -262,6 +262,14 @@ function handle_activity($activitytype, $data, $cron=false) {
}
$data
->
message
=
get_string
(
'onartefact'
,
'activity'
)
.
' '
.
$ainfo
->
title
.
' '
.
get_string
(
'ownedby'
,
'activity'
);
/*
this query selects four different cases
1. user is watching the artefact directly
2. user is watching a parent artefact with recurse = on
3. user is watching a view with recurse = on; and:
a. artefact is directly associated with view
b. artefact is a child of an artefact associated with view
*/
$sql
=
'
SELECT DISTINCT u.*, p.method, ?||wa.view AS url
FROM '
.
$prefix
.
'usr u
...
...
@@ -282,12 +290,7 @@ SELECT DISTINCT u.*, p.method, ?||wa.view AS url
ON va.artefact = pc.parent
JOIN '
.
$prefix
.
'usr_watchlist_view wv
ON va.view = wv.view
WHERE pc.artefact = ? AND wv.recurse = 1
UNION SELECT wv.usr AS uid, wv.view AS view
FROM '
.
$prefix
.
'view_artefact va
JOIN '
.
$prefix
.
'usr_watchlist_view wv
ON va.view = wv.view
WHERE va.artefact = ?
WHERE (pc.artefact = ? OR va.artefact = ?)AND wv.recurse = 1
) wa ON wa.uid = u.id
WHERE p.activity = ? OR p.activity IS NULL'
;
$values
=
array
(
get_config
(
'wwwroot'
)
.
'view/view.php?artefact='
...
...
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