fixed query notifications pending

Former-commit-id: ac8c5b5cb1276c16b9339e2e86c88d856540be0d
This commit is contained in:
fbsanchez 2019-02-11 14:51:59 +01:00
parent 17c012cd83
commit 7893827652
2 changed files with 3 additions and 3 deletions

View File

@ -372,7 +372,7 @@ function messages_get_count(
AND up.id_grupo=ng.id_group
) ON tm.id_mensaje=ng.id_mensaje
WHERE utimestamp_erased is null
AND (up.id_usuario="%s" OR nu.id_user="%s" OR ng.id_group=0)
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))
) t
%s',
$user,
@ -479,7 +479,7 @@ function messages_get_overview(
) ON tm.id_mensaje=ng.id_mensaje
%s
WHERE utimestamp_erased is null
AND (up.id_usuario="%s" OR nu.id_user="%s" OR ng.id_group=0)
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))
) t
%s
%s

View File

@ -142,7 +142,7 @@ function check_notification_readable(int $id_message)
AND up.id_grupo=ng.id_group
) ON tm.id_mensaje=ng.id_mensaje
WHERE utimestamp_erased is null
AND (up.id_usuario="%s" OR nu.id_user="%s" OR ng.id_group=0)',
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))',
$id_message,
$config['id_user'],
$config['id_user']