]> source.dussan.org Git - nextcloud-server.git/commitdiff
use OC_Connector_Sabre_Client
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 6 Jul 2012 10:24:03 +0000 (12:24 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 6 Jul 2012 10:24:03 +0000 (12:24 +0200)
apps/files_external/lib/webdav.php

index 32dd26ae6c3d90aefa60a767eaca68f321bc7695..7511096f0d949a04074d24e12ca1aefbd820c25c 100644 (file)
@@ -36,18 +36,18 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
                        $this->root.='/';
                }
                
-               $capath = '';
-               if($caview = \OCP\Files::getStorage('files_external')) {\r
-                       $capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("");
-               }
                $settings = array(
                        'baseUri' => $this->createBaseUri(),
                        'userName' => $this->user,
                        'password' => $this->password,
-                       'capath' => $capath, 
                );
-               $this->client = new Sabre_DAV_Client($settings);
 
+               $this->client = new OC_Connector_Sabre_Client($settings);
+               
+               if($caview = \OCP\Files::getStorage('files_external')) {
+                       $this->client->setCurlSettings(array(CURLOPT_CAPATH => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""),
+                                       CURLOPT_SSL_VERIFYPEER  => false));
+               }
                //create the root folder if necesary
                $this->mkdir('');
        }