mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-29 16:55:32 +00:00
Merge pull request #1424 from MatthewHana/v3.2-devel
Add custom Radicale DAV property getcontentcount
This commit is contained in:
commit
3c81f43404
1 changed files with 6 additions and 0 deletions
|
@ -272,6 +272,12 @@ def xml_propfind_response(
|
||||||
element.text = displayname
|
element.text = displayname
|
||||||
else:
|
else:
|
||||||
is404 = True
|
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"):
|
elif tag == xmlutils.make_clark("D:displayname"):
|
||||||
displayname = collection.get_meta("D:displayname")
|
displayname = collection.get_meta("D:displayname")
|
||||||
if not displayname and is_leaf:
|
if not displayname and is_leaf:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue