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 -N -r1.14 -r1.15 --- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl 15 Dec 2006 22:45:40 -0000 1.14 +++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.tcl 27 May 2008 12:10:53 -0000 1.15 @@ -448,14 +448,17 @@ # content_revision if we don't find an implementation # implementation name is content_type - if {![acs_sc_binding_exists_p dav $content_type]} { + set real_content_type [oacs_dav::conn -set real_content_type $content_type] + + while {![acs_sc_binding_exists_p dav $content_type]} { # go up content_type hierarchy # we do the query here to avoid running the query # when the implementation for the content_type does # exist - - #FIXME: write the query etc - set content_type "content_revision" + set content_type [db_string supertype "select supertype from acs_object_types where object_type = :content_type" -default ""] + if { $content_type eq "content_revision"} {break} + if { $content_type eq ""} { error "no dav implementation found for content_type $real_content_type" } + ns_log Notice "now looking for a dav implementation for content_type $content_type" } oacs_dav::conn -set content_type $content_type