]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update SabreDAV
authorJakob Sack <kde@jakobsack.de>
Wed, 10 Aug 2011 12:39:12 +0000 (14:39 +0200)
committerJakob Sack <kde@jakobsack.de>
Wed, 10 Aug 2011 12:39:12 +0000 (14:39 +0200)
3rdparty/Sabre/CardDAV/Card.php
3rdparty/Sabre/DAV/Browser/Plugin.php
3rdparty/Sabre/DAV/Server.php

index 98189aa9fd8327e28c204555695ca84963f438d6..52d8b79d7ddbc27914c432e79bbbf42089ce4f14 100644 (file)
@@ -122,7 +122,7 @@ class Sabre_CardDAV_Card extends Sabre_DAV_File implements Sabre_CardDAV_ICard,
      */
     public function getETag() {
 
-        return md5($this->cardData['carddata']);
+        return '"' . md5($this->cardData['carddata']) . '"';
 
     }
 
index 81a90558f930bf3580e215d6bdfd32ff3f0861cd..8e0ca24cff25176fcb96d021e013c13f272f653a 100644 (file)
@@ -94,7 +94,7 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
     public function httpPOSTHandler($method, $uri) {
 
         if ($method!='POST') return true;
-        if (isset($_POST['action'])) switch($_POST['action']) {
+        if (isset($_POST['sabreAction'])) switch($_POST['sabreAction']) {
 
             case 'mkcol' :
                 if (isset($_POST['name']) && trim($_POST['name'])) {
@@ -249,13 +249,13 @@ class Sabre_DAV_Browser_Plugin extends Sabre_DAV_ServerPlugin {
   if ($this->enablePost) {
       $html.= '<tr><td><form method="post" action="">
             <h3>Create new folder</h3>
-            <input type="hidden" name="action" value="mkcol" />
+            <input type="hidden" name="sabreAction" value="mkcol" />
             Name: <input type="text" name="name" /><br />
             <input type="submit" value="create" />
             </form>
             <form method="post" action="" enctype="multipart/form-data">
             <h3>Upload file</h3>
-            <input type="hidden" name="action" value="put" />
+            <input type="hidden" name="sabreAction" value="put" />
             Name (optional): <input type="text" name="name" /><br />
             File: <input type="file" name="file" /><br />
             <input type="submit" value="upload" />
index e5e9e482fee3da8d7d5052e3ace5e0ecbc1aa2b4..c6c63143d13572c0b1487f429d23b7246b1266b0 100644 (file)
@@ -1396,6 +1396,18 @@ class Sabre_DAV_Server {
         $this->broadcastEvent('afterBind',array($uri));
     }
 
+    /**
+     * This method is invoked by sub-systems creating a new directory.
+     *
+     * @param string $uri 
+     * @return void
+     */
+    public function createDirectory($uri) {
+
+        $this->createCollection($uri,array('{DAV:}collection'),array());
+
+    }
+
     /**
      * Use this method to create a new collection
      *