Index: openacs-4/packages/file-storage/file-storage.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v diff -u -r1.60.2.11 -r1.60.2.12 --- openacs-4/packages/file-storage/file-storage.info 6 Apr 2021 19:16:16 -0000 1.60.2.11 +++ openacs-4/packages/file-storage/file-storage.info 19 Apr 2021 13:01:13 -0000 1.60.2.12 @@ -7,7 +7,7 @@ f f - + OpenACS Collaborative document storage 2017-08-06 @@ -17,7 +17,7 @@ 2 #file-storage.file-storage# - + @@ -26,7 +26,6 @@ - @@ -52,7 +51,7 @@ - + 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.90.2.20 -r1.90.2.21 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 12 Apr 2021 08:36:10 -0000 1.90.2.20 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 19 Apr 2021 13:01:13 -0000 1.90.2.21 @@ -1213,6 +1213,17 @@ return $parent_id } +ad_proc -private fs::webdav_p {} { + Returns if webDAV is enabled. + + @return boolean +} { + return [expr { + [parameter::get -parameter "UseWebDavP" -default 0] && + [apm_package_installed_p oacs-dav] + }] +} + ad_proc fs::webdav_url { -item_id:required {-root_folder_id ""} @@ -1227,7 +1238,7 @@ item is not WebDAV enabled } { - if { [parameter::get -parameter "UseWebDavP"] == 0 } { + if {![fs::webdav_p]} { return "ho" } if {$package_id eq ""} { Index: openacs-4/packages/file-storage/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/index.tcl,v diff -u -r1.35.2.1 -r1.35.2.2 --- openacs-4/packages/file-storage/www/index.tcl 1 Feb 2021 11:05:42 -0000 1.35.2.1 +++ openacs-4/packages/file-storage/www/index.tcl 19 Apr 2021 13:01:13 -0000 1.35.2.2 @@ -102,7 +102,7 @@ set up_name [lang::util::localize $up_name] } -set use_webdav_p [parameter::get -parameter "UseWebDavP"] +set use_webdav_p [fs::webdav_p] if { $use_webdav_p == 1} { set webdav_url [fs::webdav_url -item_id $folder_id]