Index: openacs-4/packages/file-storage/www/folder-contents.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-contents.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/www/folder-contents.tcl 26 Apr 2002 21:07:10 -0000 1.1 +++ openacs-4/packages/file-storage/www/folder-contents.tcl 27 Apr 2002 15:31:10 -0000 1.2 @@ -8,7 +8,7 @@ {folder_id:integer {[fs::get_root_folder]}} {recurse_p:boolean 0} {n_past_days:integer 999999} - {orderby "fs_objects.name"} + {orderby "name"} } -validate { valid_folder -requires {folder_id:integer} { if {[empty_string_p $folder_id] || ![fs::folder_p -object_id $folder_id]} { @@ -27,6 +27,8 @@ table:onevalue } +set user_id [ad_verify_and_get_user_id] + form create n_past_days_form set options {{All 999999} {1 1} {2 2} {3 3} {7 7} {14 14} {30 30}} @@ -63,7 +65,7 @@ set table_def [list] -lappend table_def [list name Name {fs_objects.name $order} "\$name"] +lappend table_def [list name Name {fs_objects.name $order} "\$name"] lappend table_def [list folder_name Folder {} "\$folder_name"] lappend table_def {type Type {fs_objects.type $order} {c}} lappend table_def {size Size {fs_objects.content_size $order} {[ad_decode $type Folder "$content_size item[ad_decode $content_size 1 {} s]" URL {} "$content_size byte[ad_decode $content_size 1 {} s]"]}} @@ -82,6 +84,7 @@ and fs_objects.parent_id = fs_folders.folder_id and fs_objects.type <> 'Folder' and fs_objects.last_modified >= (sysdate - :n_past_days) + and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') [ad_order_by_from_sort_spec $orderby $table_def] " } else { @@ -93,6 +96,7 @@ where fs_objects.parent_id = :folder_id and fs_folders.folder_id = :folder_id and fs_objects.last_modified >= (sysdate - :n_past_days) + and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') [ad_order_by_from_sort_spec $orderby $table_def] " }