Index: openacs-4/packages/attachments/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/file-add.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/attachments/www/file-add.tcl 9 Nov 2008 23:29:22 -0000 1.6 +++ openacs-4/packages/attachments/www/file-add.tcl 27 Oct 2014 16:41:05 -0000 1.7 @@ -5,15 +5,15 @@ @creation-date 6 Nov 2000 @cvs-id $Id$ } { - folder_id:integer,notnull - object_id:integer,notnull + folder_id:naturalnum,notnull + object_id:naturalnum,notnull return_url:notnull pretty_object_name:notnull {title ""} {lock_title_p 0} } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ attachments.lt_The_specified_parent_]" } } @@ -26,7 +26,7 @@ # check for write permission on the folder -ad_require_permission $folder_id write +permission::require_permission -object_id $folder_id -privilege write # set templating datasources @@ -37,7 +37,7 @@ # double-click protection # if title isn't passed in ignore lock_title_p -if {[empty_string_p $title]} { +if {$title eq ""} { set lock_title_p 0 }