diff options
author | Jakob Sack <mail@jakobsack.de> | 2012-08-12 09:06:46 +0200 |
---|---|---|
committer | Jakob Sack <mail@jakobsack.de> | 2012-08-12 09:06:46 +0200 |
commit | 6d94455540781950b063b39385324ffe90f702c3 (patch) | |
tree | 06ddfe8393e570c90ea1bc3bfa07a4f1faf7d58f | |
parent | 2871896d547be5a5f74b861b3de0fd19839863d0 (diff) | |
download | nextcloud-server-6d94455540781950b063b39385324ffe90f702c3.tar.gz nextcloud-server-6d94455540781950b063b39385324ffe90f702c3.zip |
Fix OC_Connector_Sabre_Locks for SQLite
-rw-r--r-- | lib/connector/sabre/locks.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php index 94382e68a1a..3fabfcf3399 100644 --- a/lib/connector/sabre/locks.php +++ b/lib/connector/sabre/locks.php @@ -41,8 +41,10 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract { // NOTE: the following 10 lines or so could be easily replaced by // pure sql. MySQL's non-standard string concatination prevents us // from doing this though. - $query = 'SELECT * FROM *PREFIX*locks WHERE userid = ? AND (created + timeout) > ? AND ((uri = ?)'; - $params = array(OC_User::getUser(),time(),$uri); + // Fix: sqlite does not insert time() as a number but as text, making + // the equation returning false all the time + $query = 'SELECT * FROM *PREFIX*locks WHERE userid = ? AND (created + timeout) > '.time().' AND ((uri = ?)'; + $params = array(OC_User::getUser(),$uri); // We need to check locks for every part in the uri. $uriParts = explode('/',$uri); |