Skip to content
GitLab
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
54b22317
Commit
54b22317
authored
Sep 06, 2010
by
Richard Mansfield
Browse files
Fix notification deletion in Mysql (bug #630891)
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
4487a654
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/account/activity/index.json.php
View file @
54b22317
...
...
@@ -74,13 +74,16 @@ else if ($delete) {
$strids
=
join
(
','
,
$ids
);
$userid
=
$USER
->
get
(
'id'
);
db_begin
();
// Remove parent pointers to messages we're about to delete
// Use temp table in subselect for Mysql compat.
execute_sql
(
"
UPDATE
{
notification_internal_activity
}
SET parent = NULL
WHERE parent IN (
SELECT id
FROM
{
notification_internal_activity
}
WHERE id IN (
$strids
) AND usr = ?
FROM (
SELECT id FROM
{
notification_internal_activity
}
WHERE id IN (
$strids
) AND usr = ?
) AS temp
)"
,
array
(
$userid
)
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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