Index: openacs-4/packages/attachments/www/detach.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/detach.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/attachments/www/detach.tcl 6 Jul 2007 12:13:23 -0000 1.3 +++ openacs-4/packages/attachments/www/detach.tcl 27 Oct 2014 16:41:05 -0000 1.4 @@ -8,8 +8,8 @@ @creation-date 2006-07-13 @cvs-id $Id$ } { - object_id:notnull - attachment_id:notnull + object_id:naturalnum,notnull + attachment_id:naturalnum,notnull {return_url ""} } -properties { } -validate { @@ -72,7 +72,9 @@ } -on_request { } -on_submit { attachments::unattach -object_id $object_id -attachment_id $attachment_id - if {[exists_and_not_null delete_button] && !$attached_to_other_objects_n} { + if {([info exists delete_button] && $delete_button ne "") + && !$attached_to_other_objects_n + } { fs::delete_file -item_id $attachment_id } } -after_submit {