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.18 -r1.19 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 28 Jun 2002 15:12:29 -0000 1.18 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 2 Jul 2002 19:40:00 -0000 1.19 @@ -148,14 +148,22 @@ # ad_proc fs_context_bar_list { + {-root_folder_id ""} {-final ""} + {-folder_url "index"} + {-file_url "file"} + {-extra_vars ""} item_id } { Constructs the list to be fed to ad_context_bar appropriate for item_id. If -final is specified, that string will be the last item in the context bar. Otherwise, the name corresponding to item_id will be used. } { + if {[empty_string_p $root_folder_id]} { + set root_folder_id [fs_get_root_folder] + } + if [empty_string_p $final] { set start_id [db_string parent_id " select parent_id from cr_items where item_id = :item_id"] @@ -166,23 +174,7 @@ set start_id $item_id } - set context_bar [db_list_of_lists context_bar " - select decode( - file_storage.get_content_type(i.item_id), - 'content_folder', - 'index?folder_id=', - 'file?file_id=' - ) || i.item_id, - file_storage.get_title(i.item_id) - from cr_items i - where item_id not in ( - select i2.item_id - from cr_items i2 - connect by prior i2.parent_id = i2.item_id - start with i2.item_id = file_storage.get_root_folder([ad_conn package_id])) - connect by prior i.parent_id = i.item_id - start with item_id = :start_id - order by level desc"] + set context_bar [db_list_of_lists context_bar {}] lappend context_bar $final