Index: openacs-4/packages/file-storage/www/file-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file-edit.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/file-storage/www/file-edit.tcl 21 Apr 2009 11:08:23 -0000 1.10 +++ openacs-4/packages/file-storage/www/file-edit.tcl 27 Oct 2014 16:41:32 -0000 1.11 @@ -5,10 +5,10 @@ @creation-date 5 Dec 2000 @cvs-id $Id$ } { - file_id:integer,notnull + file_id:naturalnum,notnull } -validate { valid_file -requires {file_id} { - if ![fs_file_p $file_id] { + if {![fs_file_p $file_id]} { ad_complain "[_ file-storage.lt_The_specified_file_is]" } } @@ -21,7 +21,7 @@ #check they have write permission on this file -ad_require_permission $file_id write +permission::require_permission -object_id $file_id -privilege write set context [fs_context_bar_list -final "[_ file-storage.Rename]" $file_id] @@ -54,9 +54,9 @@ ad_form -extend -form { {submit:text(submit) {label $submit_label}} } -on_submit { - if [catch { + if {[catch { db_dml edit_title {} - } errmsg] { + } errmsg]} { if { [db_string duplicate_check {}] } { ad_return_complaint 1 "[_ file-storage.lt_It_appears_that_there]" } else {