Commit 88850291 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Postgres query fix!


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 8e6cbcc4
......@@ -150,12 +150,12 @@ for ($i = 0; $i < $count; $i++) {
// read all the posts on this page, but better than letting the unread
// notifications grow too fast. Unfortunately the only way to find
// notifications on this topic is to look for the url of this page.
execute_sql("
UPDATE {notification_internal_activity} n
SET n.read = 1
WHERE n.read = 0 AND usr = ? AND url LIKE ? || '%' AND type = (
execute_sql('
UPDATE {notification_internal_activity}
SET "read" = 1
WHERE "read" = 0 AND usr = ? AND url LIKE ? || \'%\' AND type = (
SELECT id FROM {activity_type} WHERE name = ?
)",
)',
array(
$USER->get('id'),
get_config('wwwroot') . 'interaction/forum/topic.php?id=' . $topicid . '#post',
......
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