Index: openacs-4/packages/general-comments/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-add.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/general-comments/www/file-add.tcl 7 Nov 2002 08:32:49 -0000 1.4 +++ openacs-4/packages/general-comments/www/file-add.tcl 27 Oct 2014 16:41:43 -0000 1.5 @@ -10,7 +10,7 @@ @creation-date 2000-10-12 @cvs-id $Id$ } { - parent_id:notnull,integer + parent_id:notnull,naturalnum {return_url {} } } -properties { page_title:onevalue @@ -21,15 +21,15 @@ file_name:onevalue } -validate { allow_file_attachments { - set allow_files_p [ad_parameter AllowFileAttachmentsP {general-comments} {t}] + set allow_files_p [parameter::get -parameter AllowFileAttachmentsP -default {t}] if { $allow_files_p != "t" } { ad_complain "Attaching files to comments has been disabled." } } } # check to see if the user can add an attachment -ad_require_permission $parent_id write +permission::require_permission -object_id $parent_id -privilege write # set variables for template set attach_id [db_nextval acs_object_id_seq]