Index: openacs-4/packages/file-storage/lib/folder-links.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/lib/folder-links.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/file-storage/lib/folder-links.tcl 7 Aug 2017 23:48:11 -0000 1.5 +++ openacs-4/packages/file-storage/lib/folder-links.tcl 15 Mar 2019 09:08:44 -0000 1.5.2.1 @@ -1,32 +1,33 @@ -# shows a list of links from a file-storage folder. +ad_include_contract { -# @param base_url URL to prepend to the relative URL from file-storage -# used to deliver content from another index.vuh than -# file-storage/view/ -if {![info exists base_url] || $base_url eq ""} { - set base_url "/view/" + Shows a list of links from a file-storage folder. + + @param base_url URL to prepend to the relative URL from file-storage + used to deliver content from another index.vuh than + file-storage/view/ + @param object_list restrict results to object_ids in object_list + @param show_all_p include subfolders and contents? + @param admin_p show links to properties page for a file? + @param return_url URL to add to admin links + @param permission_check check read permissions for the user on the + folder only (true) or on every record (false) + + apisano 2019-03-15: this include is currently referenced only by + folder-admin, which in turn is currently used only by + dotlrn-ecommerce. +} { + {base_url:localurl "/view/"} + {object_list:integer,multiple ""} + {show_all_p:boolean false} + {admin_p:boolean false} + {return_url:localurl "[ad_return_url]"} + {permission_check:boolean true} } -# @param object_list restrict results to object_ids in object_list -if {![info exists object_list] || $object_list eq ""} { - set object_list {} -} -# @param show_all_p include subfolders and contents? default 0 -if {![info exists show_all_p] || $show_all_p eq ""} { - set show_all_p 0 -} -# @param admin_p show links to properties page for a file? default 0 -if {![info exists admin_p] || $admin_p eq ""} { - set admin_p 0 -} -# @param return_url URL to add to admin links -if {![info exists return_url] || $return_url eq ""} { - set return_url [ad_return_url] -} set object_list_where "" set viewing_user_id [ad_conn user_id] -if {[info exists permission_check] && $permission_check eq 0 } { +if {!$permission_check} { set permission_p 1 set permission_clause [db_map permission_clause] } else {