Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 22 May 2002 16:42:31 -0000 1.15
+++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 22 May 2002 17:01:56 -0000 1.16
@@ -290,6 +290,14 @@
return [db_exec_plsql new_folder {}]
}
+ ad_proc -public object_p {
+ {-object_id:required}
+ } {
+ is this a file storage object
+ } {
+ return [db_string select_object_p {}]
+ }
+
ad_proc -public get_object_name {
{-object_id:required}
} {
Index: openacs-4/packages/file-storage/tcl/file-storage-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/file-storage/tcl/file-storage-procs.xql 22 May 2002 16:42:31 -0000 1.8
+++ openacs-4/packages/file-storage/tcl/file-storage-procs.xql 22 May 2002 17:01:56 -0000 1.9
@@ -43,6 +43,16 @@
+
+
+ select count(*)
+ from dual
+ where exists (select 1
+ from fs_objects
+ where object_id = :object_id)
+
+
+
select name
Index: openacs-4/packages/file-storage/www/download-archive/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/download-archive/index.vuh,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/file-storage/www/download-archive/index.vuh 22 May 2002 16:42:31 -0000 1.1
+++ openacs-4/packages/file-storage/www/download-archive/index.vuh 22 May 2002 17:01:56 -0000 1.2
@@ -24,6 +24,11 @@
# convenient way to get the values out of a list
foreach {object_id download_name} [split [ad_conn path_info] /] {break}
+if {![fs::object_p -object_id $object_id]} {
+ ad_return_complaint 1 "Object \#$object_id is not a file storage object."
+ ad_script_abort
+}
+
set user_id [ad_conn user_id]
if {$user_id == 0} {
set user_id ""