Fix returning dead properties in an allprop PROPFIND

dead_properties is an assoc.array from name to value, but it was being merged
with simple arrays of property names.

This means that tests 0824 and 0828 now actually return the dead properties, so
I've updated those result files.

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
This commit is contained in:
Jamie McClymont 2018-11-13 11:35:04 +13:00
parent 8c01c83e4b
commit 0e0a07eb30
3 changed files with 25 additions and 3 deletions

View File

@ -1534,7 +1534,7 @@ EOQRY;
*/
function DAV_AllProperties() {
if ( !isset($this->dead_properties) ) $this->FetchDeadProperties();
$allprop = array_merge( (isset($this->dead_properties)?$this->dead_properties:array()),
$allprop = array_merge( (isset($this->dead_properties)?array_keys($this->dead_properties):array()),
(isset($include_properties)?$include_properties:array()),
array(
'DAV::getcontenttype', 'DAV::resourcetype', 'DAV::getcontentlength', 'DAV::displayname', 'DAV::getlastmodified',

View File

@ -1,9 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<multistatus xmlns="DAV:" xmlns:A="http://apple.com/ns/ical/" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="urn:org:davical">
<response>
<href>/caldav.php/user1/home/</href>
<propstat>
<prop>
<A:calendar-color>#0252D4FF</A:calendar-color>
<A:calendar-order>1</A:calendar-order>
<C:schedule-default-calendar-URL>
<href>/caldav.php/user1/home/</href>
</C:schedule-default-calendar-URL>
<D:outer>
<D:middle>
<D:inner>inside</D:inner>
<D:inner>inside2</D:inner>
</D:middle>
</D:outer>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<collection/>

View File

@ -1,9 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<multistatus xmlns="DAV:" xmlns:A="http://apple.com/ns/ical/" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="urn:org:davical">
<response>
<href>/caldav.php/user1/home/</href>
<propstat>
<prop>
<A:calendar-color>#0252D4FF</A:calendar-color>
<A:calendar-order>1</A:calendar-order>
<C:schedule-default-calendar-URL>
<href>/caldav.php/user1/home/</href>
</C:schedule-default-calendar-URL>
<D:outer>
<D:middle>
<D:inner>inside</D:inner>
<D:inner>inside2</D:inner>
</D:middle>
</D:outer>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<collection/>