dupondje / PHP-Push-2

Z-Push Fork With CalDAV/LDAP Support
GNU Affero General Public License v3.0
67 stars 24 forks source link

CardDAV not working with SabreDAV ( OwnCloud 5.0.7) #82

Closed arved closed 11 years ago

arved commented 11 years ago

Sorry for opening another issue, but I cant locate the last relateted one. After doning some investigations it seems, that the main issue on having CardDAV not working against sabreDAV, it apperars that sabreDAV does not support the "sync-collection" command, used in /include/carddav.php:

public function get_all_vcards($include_vcards = true, $raw = false) ....

$content = '<?xml version="1.0" encoding="utf-8" ?>/D:sync-token/C:address-data/D:prop/D:sync-collection';

After made some minor changes to this file to avoid the access problems (Changing any apperance of CURLAUTH_ANY to CURLAUTH_BASIC, ans adding this

    if ($this->auth !== null)
    {

        curl_setopt($this->curl, CURLOPT_HTTPAUTH,  CURLAUTH_BASIC);
        curl_setopt($this->curl, CURLOPT_USERPWD, $this->auth);

    }

direct before the

    $complete_response  = curl_exec($this->curl);

line in the query function.

As far as I see the function get_all_vcards exists not in the carddav.php repository, so I assume, that this function ist created in this project.

Maybe it will work, when this CardDAV report body is replaced by something compareable with a PROPFIND or addressbook-query statement?

arved commented 11 years ago

added content to similar issue #80 https://github.com/dupondje/PHP-Push-2/issues/80 and closed it.