Index: openacs-4/packages/oacs-dav/oacs-dav.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/oacs-dav.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/oacs-dav/oacs-dav.info 16 Feb 2004 16:49:27 -0000 1.1 +++ openacs-4/packages/oacs-dav/oacs-dav.info 16 Feb 2004 18:59:16 -0000 1.2 @@ -6,13 +6,15 @@ f t - - + webdav-support + + dave bauer Provides services to enable webDAV access to content repository items. + 2004-02-16 An interface to the tDAV webDAV package. oacs-dav provides services to offer webDAV access to content repository data. - + Index: openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl 16 Feb 2004 16:49:28 -0000 1.1 +++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl 16 Feb 2004 18:59:17 -0000 1.2 @@ -12,7 +12,18 @@ namespace eval oacs_dav {} +ad_proc oacs_dav::folder_enabled { + -folder_id +} { + @param folder_id + @return t if folder is webdav enabled, f if not +} { + + return [db_string enabled_p "" -default "f"] + +} + ad_proc oacs_dav::set_user_id {} { set user_id based on authentication header } { @@ -243,13 +254,20 @@ return $parent_id } +ad_proc -public oacs_dav::uri_prefix { +} { + @return URI prefix to use for WebDAV requests +} { + set oacs_dav_package_id [apm_package_id_from_key "oacs-dav"] + return [parameter::get -package_id $oacs_dav_package_id -parameter "WebDAV URL Prefix" -default "/dav"] +} + ad_proc -public oacs_dav::conn_setup {} { Setup oacs_dav::conn, authenticate user } { ad_conn -reset set uri [ns_conn url] - set oacs_dav_package_id [apm_package_id_from_key "oacs-dav"] - set dav_url_regexp "^[parameter::get -package_id $oacs_dav_package_id -parameter "WebDAV URL Prefix" -default "/dav"]" + set dav_url_regexp "^[oacs_dav::uri_prefix]" set uri [regsub $dav_url_regexp $uri {}] oacs_dav::conn -set uri $uri set method [ns_conn method] Index: openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 16 Feb 2004 16:49:28 -0000 1.1 +++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 16 Feb 2004 18:59:17 -0000 1.2 @@ -1,5 +1,14 @@ + + + + select enabled_p + from dav_site_node_folder_map + where folder_id=:folder_id + + + insert into dav_site_node_folder_map