Index: openacs-4/packages/notifications/tcl/notification-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-callback-procs.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/notifications/tcl/notification-callback-procs.tcl 12 Sep 2015 11:06:45 -0000 1.5.2.1 +++ openacs-4/packages/notifications/tcl/notification-callback-procs.tcl 3 Jul 2016 15:41:17 -0000 1.5.2.2 @@ -13,7 +13,7 @@ Show the notifications of user_id } { set result [list "Notifications of $user_id"] - set user_notifications [db_list_of_lists user_notification { *SQL* }] + set user_notifications [db_list_of_lists user_notification {}] lappend result $user_notifications return $result } @@ -29,8 +29,8 @@ ns_log Notice $msg db_transaction { - db_dml upd_notifications { *SQL* } - db_dml upd_map { *SQL* } + db_dml upd_notifications {} + db_dml upd_map {} lappend result "Notifications merge is done" } return $result Index: openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-oracle.xql,v diff -u -r1.20 -r1.20.6.1 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 27 Mar 2010 14:26:47 -0000 1.20 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 3 Jul 2016 15:41:17 -0000 1.20.6.1 @@ -57,4 +57,15 @@ + + + select request_id + from notification_requests + where not exists (select 1 from acs_object_party_privilege_map ppm + where ppm.object_id = notification_requests.object_id + and ppm.privilege = 'read' + and ppm.party_id = notification_requests.user_id) + + + Index: openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-postgresql.xql,v diff -u -r1.12 -r1.12.4.1 --- openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 2 Apr 2013 11:05:18 -0000 1.12 +++ openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 3 Jul 2016 15:41:17 -0000 1.12.4.1 @@ -36,10 +36,7 @@ and creation_date <= notif_date and (notif_date is null or notif_date < current_timestamp) and interval_id = :interval_id - and exists (select 1 from acs_object_party_privilege_map ppm - where ppm.object_id = notification_requests.object_id - and ppm.privilege = 'read' - and ppm.party_id = notification_requests.user_id) + and acs_permission__permission_p(notification_requests.object_id, notification_requests.user_id, 'read') order by user_id, type_id, notif_date Index: openacs-4/packages/notifications/tcl/sweep-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.xql,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/notifications/tcl/sweep-procs.xql 27 Oct 2014 16:41:50 -0000 1.3 +++ openacs-4/packages/notifications/tcl/sweep-procs.xql 3 Jul 2016 15:41:17 -0000 1.3.2.1 @@ -16,15 +16,5 @@ - - - select request_id - from notification_requests - where not exists (select 1 from acs_object_party_privilege_map ppm - where ppm.object_id = notification_requests.object_id - and ppm.privilege = 'read' - and ppm.party_id = notification_requests.user_id) - - Index: openacs-4/packages/notifications/www/request-notification.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-notification.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/notifications/www/request-notification.tcl 12 Sep 2015 11:06:48 -0000 1.2.2.1 +++ openacs-4/packages/notifications/www/request-notification.tcl 3 Jul 2016 15:41:17 -0000 1.2.2.2 @@ -122,7 +122,7 @@ } } -db_multirow notify_users notify_users { *SQL* } +db_multirow notify_users notify_users {} Index: openacs-4/packages/notifications/www/request-unsubscribe-notification.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-unsubscribe-notification.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/notifications/www/request-unsubscribe-notification.tcl 12 Sep 2015 11:06:48 -0000 1.2.2.1 +++ openacs-4/packages/notifications/www/request-unsubscribe-notification.tcl 3 Jul 2016 15:41:17 -0000 1.2.2.2 @@ -47,7 +47,7 @@ } } - db_multirow notify_users notify_users { *SQL* } + db_multirow notify_users notify_users {} # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/notifications/www/unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/unsubscribe.tcl,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/notifications/www/unsubscribe.tcl 21 May 2016 10:18:18 -0000 1.2.2.2 +++ openacs-4/packages/notifications/www/unsubscribe.tcl 3 Jul 2016 15:41:17 -0000 1.2.2.3 @@ -14,7 +14,7 @@ for { set i 0} { $i < $request_count } { incr i } { db_transaction { set r_id [lindex $request_id $i] - db_dml remove_notify { *SQL* } + db_dml remove_notify {} } }