Skip to content

Commit

Permalink
#1133 Cadaver
Browse files Browse the repository at this point in the history
  • Loading branch information
picman committed Feb 9, 2021
1 parent 9daadb7 commit fbce894
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 1 addition & 3 deletions lib/dav4rack/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def propfind
return MultiStatus
end


properties = if propfind.nil? or
propfind.empty? or
propfind.xpath("//#{ns}allprop").first
Expand Down Expand Up @@ -275,6 +274,7 @@ def propfind
r.multistatus do |xml|
xml << r.raw(prop_xml)
end

MultiStatus
end

Expand Down Expand Up @@ -320,8 +320,6 @@ def lock
asked[:timeout] = timeout.split(',').map{|x|x.strip}
end

Rails.logger.info ">>> #{request.document}"

ns = request.ns
if doc = request.document and lockinfo = doc.xpath("//#{ns}lockinfo")

Expand Down
10 changes: 10 additions & 0 deletions lib/redmine_dmsf/webdav/base_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ def self.get_project(scope, name, parent_project)
prj
end

# Adds the given xml namespace to namespaces and returns the prefix
def add_namespace(ns, prefix = "unknown#{rand 65536}")
@__proxy.add_namespace ns, prefix
end

# returns the prefix for the given namespace, adding it if necessary
def prefix_for(ns_href)
@__proxy.prefix_for ns_href
end

private

def get_resource_info
Expand Down
10 changes: 0 additions & 10 deletions lib/redmine_dmsf/webdav/dmsf_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,6 @@ def lockdiscovery_xml
x
end

# Adds the given xml namespace to namespaces and returns the prefix
def add_namespace(ns, prefix = "unknown#{rand 65536}")
@__proxy.add_namespace ns, prefix
end

# returns the prefix for the given namespace, adding it if necessary
def prefix_for(ns_href)
@__proxy.prefix_for ns_href
end

private

# Prepare file for download using Rack functionality:
Expand Down
1 change: 1 addition & 0 deletions lib/redmine_dmsf/webdav/project_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ def self.create_project_name(prj)

end
end

end

0 comments on commit fbce894

Please sign in to comment.