Commit 54b22317 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix notification deletion in Mysql (bug #630891)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 4487a654
......@@ -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)
);
......
Markdown is supported
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