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 :)
This commit is contained in:
parent
f40a1cad8b
commit
f2845bbea8
|
@ -687,9 +687,14 @@ VALUES (?,?,?,?,?,'timeout',?,?)");
|
||||||
function UNLOCK(&$options)
|
function UNLOCK(&$options)
|
||||||
{
|
{
|
||||||
$query = OC_DB::prepare("DELETE FROM *PREFIX*locks
|
$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 = ?
|
WHERE path = ?
|
||||||
AND token = ?");
|
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";
|
return PEAR::isError($result) ? "409 Conflict" : "204 No Content";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue