[Pkg-owncloud-commits] [php-sabredav] 19/40: PostgreSQL fix for the Locks PDO backend.
David Prévot
taffit at moszumanska.debian.org
Sat Sep 5 15:24:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 3.1.0-alpha2
in repository php-sabredav.
commit 5f73dae46e5ce0aed09d0cc866fdbef859f32641
Author: Evert Pot <me at evertpot.com>
Date: Thu Aug 6 17:03:09 2015 -0400
PostgreSQL fix for the Locks PDO backend.
Thnx @TCKnet. Fixes #699
---
CHANGELOG.md | 1 +
lib/DAV/Locks/Backend/PDO.php | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d34baad..c7a3013 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ ChangeLog
usage.
* Fixed a privilege bug in the availability system.
* #697: Added a "tableName" member to the PropertyStorage PDO backend. (@Frzk).
+* #699: PostgreSQL fix for the Locks PDO backend. (@TCKnet)
3.1.0-alpha1 (2015-07-19)
diff --git a/lib/DAV/Locks/Backend/PDO.php b/lib/DAV/Locks/Backend/PDO.php
index d39bb08..dd85053 100644
--- a/lib/DAV/Locks/Backend/PDO.php
+++ b/lib/DAV/Locks/Backend/PDO.php
@@ -59,7 +59,7 @@ class PDO extends AbstractBackend {
// NOTE: the following 10 lines or so could be easily replaced by
// pure sql. MySQL's non-standard string concatenation prevents us
// from doing this though.
- $query = 'SELECT owner, token, timeout, created, scope, depth, uri FROM ' . $this->tableName . ' WHERE ((created + timeout) > CAST(? AS UNSIGNED INTEGER)) AND ((uri = ?)';
+ $query = 'SELECT owner, token, timeout, created, scope, depth, uri FROM ' . $this->tableName . ' WHERE (created > (? - timeout)) AND ((uri = ?)';
$params = [time(),$uri];
// We need to check locks for every part in the uri.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list