Index: openacs-4/packages/calendar/www/admin/calendar-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/admin/calendar-create.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/calendar/www/admin/calendar-create.tcl 23 Apr 2001 23:09:38 -0000 1.1 +++ openacs-4/packages/calendar/www/admin/calendar-create.tcl 27 Oct 2014 16:41:09 -0000 1.2 @@ -15,30 +15,33 @@ @creation-date Dec 14, 2000 @cvs-id $Id$ } { - {party_id:notnull} + {party_id:naturalnum,notnull} {calendar_name:notnull} {calendar_permission "private"} } -# needs to perform check on if the calendar_name is already being used +# Needs to perform check on if the calendar_name is already being used # whether or not this is a need should be further thought about # create the calendar -set calendar_id [calendar_create $party_id "f" $calendar_name] +set calendar_id [calendar::create $party_id "f" $calendar_name] -# if the permission is public, we assign it right now -# if the permission is private, we would have to wait until +# GN: "permission" is here a misnomer, should be called "privilege", +# but it is used in several page contracts of this package. +# +# If the permission is public, we assign it right now. +# If the permission is private, we would have to wait until # the user selects an audience. -if { [string equal $calendar_permission "public"]} { +if {$calendar_permission eq "public"} { # assign the permission to the calendar - calendar_assign_permissions $calendar_id $party_id $calendar_permission + calendar::assign_permissions $calendar_id $party_id $calendar_permission ad_returnredirect "one?action=permission&calendar_id=$calendar_id" -} elseif { [string equal $calendar_permission "private"]} { +} elseif {$calendar_permission eq "private"} { - # this would be a special case where they'd have to select their audience first + # This would be a special case where they'd have to select their audience first ad_returnredirect "one?action=permission&calendar_id=$calendar_id&calendar_permission=private" }