Index: openacs-4/packages/calendar/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/apm-callback-procs.tcl,v diff -u -N -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/calendar/tcl/apm-callback-procs.tcl 5 Jul 2007 12:21:00 -0000 1.1.2.1 +++ openacs-4/packages/calendar/tcl/apm-callback-procs.tcl 10 Sep 2007 23:10:14 -0000 1.1.2.2 @@ -25,34 +25,11 @@ -spec { 2.1.0b7 2.1.0b8 { db_transaction { - # get all personal calendars - set to_modify [db_list to_modify "select calendar_id from calendars - where calendar_name = 'Personal'"] - foreach obj $to_modify { - # set security_inherit_p to false - db_dml update_context "update acs_objects - set security_inherit_p = 'f' - where object_id = :obj" - ns_log Notice "updated calendar $obj" - } + db_dml update_context {} + db_dml remove_personal_notifications {} } on_error { ns_log Error "Error:$errmsg" } - - db_transaction { - # done with permissions, now we get rid of personal notifications - set req_to_delete [db_list req_to_delete "select unique request_id from notification_requests, calendars - where calendar_name = 'Personal' and package_id = object_id - and type_id = (select type_id from notification_types - where short_name = 'calendar_notif')"] - # do the delete - foreach req_id $req_to_delete { - db_dml remove_personal_notifications "delete from notification_requests where request_id = :req_id" - ns_log Notice "removed notification request $req_id to personal calendar" - } - } on_error { - ns_log Error "Error:$errmsg" - } } } } Index: openacs-4/packages/calendar/tcl/apm-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/apm-callback-procs.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/tcl/apm-callback-procs.xql 10 Sep 2007 23:10:14 -0000 1.1.2.1 @@ -0,0 +1,25 @@ + + + + + + update acs_objects + set security_inherit_p = 'f' + where object_id in (select calendar_id from calendars + where calendar_name = 'Personal') + + + + + + delete from notification_requests + where request_id in (select request_id + from notification_requests, calendars + where calendar_name = 'Personal' and package_id = object_id + and type_id = (select type_id + from notification_types + where short_name = 'calendar_notif')) + + + +