summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKunal Ghosh <kunal.t2@gmail.com>2011-07-02 07:17:05 +0530
committerKunal Ghosh <kunal.t2@gmail.com>2011-07-02 07:17:05 +0530
commitf2845bbea877e6ddaba897879b0625c0535b5fe1 (patch)
tree68bbd71be34e65d5acb679738dc5f82579dff59c
parentf40a1cad8b55bafa08d7e96415d4d2f9c7059a38 (diff)
downloadnextcloud-server-f2845bbea877e6ddaba897879b0625c0535b5fe1.tar.gz
nextcloud-server-f2845bbea877e6ddaba897879b0625c0535b5fe1.zip
Fix to make the Unlock mechanism of WebDAV work. Previously when using unlock in cadaver etc was used the lock entry corresponding to the file was not deleted in the sqlite database table oc_locks. The error was because the delete query in the Unlock function was not getting executed :)
-rw-r--r--lib/HTTP/WebDAV/Server/Filesystem.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/HTTP/WebDAV/Server/Filesystem.php b/lib/HTTP/WebDAV/Server/Filesystem.php
index 164892c9d86..5f261643624 100644
--- a/lib/HTTP/WebDAV/Server/Filesystem.php
+++ b/lib/HTTP/WebDAV/Server/Filesystem.php
@@ -687,9 +687,14 @@ VALUES (?,?,?,?,?,'timeout',?,?)");
function UNLOCK(&$options)
{
$query = OC_DB::prepare("DELETE FROM *PREFIX*locks
+ WHERE path = '$options[path]'
+ AND token = '$options[token]'");
+ /*
+ $query = OC_DB::prepare("DELETE FROM *PREFIX*locks
WHERE path = ?
AND token = ?");
- $query->execute(array($options[path]),$options[token]);
+ */
+ $query->execute();#array($options[path]),$options[token]);
return PEAR::isError($result) ? "409 Conflict" : "204 No Content";
}