Skip to content

Commit

Permalink
Merge pull request #1424 from MatthewHana/v3.2-devel
Browse files Browse the repository at this point in the history
Add custom Radicale DAV property getcontentcount
  • Loading branch information
pbiering authored Mar 12, 2024
2 parents bb185a9 + 825464f commit 3c81f43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions radicale/app/propfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ def xml_propfind_response(
element.text = displayname
else:
is404 = True
elif tag == xmlutils.make_clark("RADICALE:getcontentcount"):
# Only for internal use by the web interface
if isinstance(item, storage.BaseCollection) and not collection.is_principal:
element.text = str(sum(1 for x in item.get_all()))
else:
is404 = True
elif tag == xmlutils.make_clark("D:displayname"):
displayname = collection.get_meta("D:displayname")
if not displayname and is_leaf:
Expand Down

0 comments on commit 3c81f43

Please sign in to comment.