antoniop
committed
on 08 Mar 23
Relax object type check
openacs-4/.../file-storage/www/file.tcl (+2 -2)
177 177     # FIXME urlencode each part of the path
178 178     # set file_url [ad_urlencode $file_url]
179 179     set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi]
180 180     set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"]
181 181     set content_size_pretty [lc_content_size_pretty -size $content_size]
182 182     if {$title eq ""} {
183 183         set title "[_ file-storage.untitled]"
184 184     }
185 185     if {$version_id ne $live_revision } {
186 186         set version_url [export_vars -base "download/$title" {version_id}]
187 187     } else {
188 188         set version_url [export_vars -base "download/$title" {file_id}]
189 189     }
190 190     if {$delete_p} {
191 191         set version_delete [_ file-storage.Delete_Version]
192 192         set version_delete_url [export_vars -base version-delete version_id]
193 193     }
194 194     set author_link [acs_community_member_link -user_id $author_id -label $author]
195 195 }
196 196
197   if { [apm_package_installed_p "general-comments"] && [parameter::get -parameter "GeneralCommentsP" -package_id [ad_conn package_id]] } {
  197 if { [namespace which ::general_comments_create_link] ne "" && [parameter::get -parameter "GeneralCommentsP" -package_id [ad_conn package_id]] } {
198 198     set gc_link [general_comments_create_link $file_id $return_url]
199 199     set gc_comments [general_comments_get_comments $file_id $return_url]
200 200 } else {
201 201     set gc_link ""
202 202     set gc_comments ""
203 203 }
204 204
205 205 if { $categories_p } {
206 206     set category_links [fs::category_links -object_id $file_id -folder_id $folder_id]
207 207 }
208 208
209 209 # Local variables:
210 210 #    mode: tcl
211 211 #    tcl-indent-level: 4
212 212 #    indent-tabs-mode: nil
213 213 # End: