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 -N -r1.2.8.1 -r1.2.8.2 --- openacs-4/packages/file-storage/lib/folder-links.tcl 29 Sep 2013 11:44:20 -0000 1.2.8.1 +++ openacs-4/packages/file-storage/lib/folder-links.tcl 3 Oct 2013 08:33:57 -0000 1.2.8.2 @@ -3,23 +3,23 @@ # @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 {![exists_and_not_null base_url]} { +if {(![info exists base_url] || $base_url eq "")} { set base_url "/view/" } # @param object_list restrict results to object_ids in object_list -if {![exists_and_not_null object_list]} { +if {(![info exists object_list] || $object_list eq "")} { set object_list {} } # @param show_all_p include subfolders and contents? default 0 -if {![exists_and_not_null show_all_p]} { +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 {![exists_and_not_null admin_p]} { +if {(![info exists admin_p] || $admin_p eq "")} { set admin_p 0 } # @param return_url URL to add to admin links -if {![exists_and_not_null return_url]} { +if {(![info exists return_url] || $return_url eq "")} { set return_url [ad_return_url] } @@ -49,7 +49,7 @@ lassign [fs::get_folder_package_and_root $folder_id] package_id root_folder_id set fs_url [site_node::get_url_from_object_id -object_id $package_id] - if {![string equal $root_folder_id $folder_id] && [string equal "/view/" $base_url]} { + if {$root_folder_id ne $folder_id && "/view/" eq $base_url} { set folder_path [db_exec_plsql get_folder_path {}] } else { set folder_path "" @@ -63,19 +63,19 @@ set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] - # if {![empty_string_p $description]} { + # if {$description ne ""} { # set description " - $description" # } - if {[string equal $type "folder"]} { + if {$type eq "folder"} { set content_size_pretty [lc_numeric $content_size] append content_size_pretty " [_ file-storage.items]" set pretty_type "Folder" } else { if {$content_size < 1024} { set content_size_pretty "[lc_numeric $content_size] [_ file-storage.bytes]" } else { - set content_size_pretty "[lc_numeric [expr $content_size / 1024 ]] [_ file-storage.kb]" + set content_size_pretty "[lc_numeric [expr {$content_size / 1024 }]] [_ file-storage.kb]" } }