diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-05-28 17:46:24 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-05-28 17:46:24 +0200 |
commit | 66effbfe0827fc61fff6d248797a894213ad20d6 (patch) | |
tree | 0fbb5ca644e1140e5b3b44b1adc874043790c388 /vendor/sabre/dav/lib/CardDAV/Backend/PDO.php | |
parent | ac4688eac087854bf8cb0c893d7a79052ad63a20 (diff) | |
download | volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.gz volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.bz2 volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.zip |
upgrade to sabre32
Diffstat (limited to 'vendor/sabre/dav/lib/CardDAV/Backend/PDO.php')
-rw-r--r-- | vendor/sabre/dav/lib/CardDAV/Backend/PDO.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php index 5509ddc02..7c3feff93 100644 --- a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php +++ b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php @@ -128,7 +128,7 @@ class PDO extends AbstractBackend implements SyncSupport { } else { $query .= ', '; } - $query .= ' `' . $key . '` = :' . $key . ' '; + $query .= ' ' . $key . ' = :' . $key . ' '; } $query .= ' WHERE id = :addressbookid'; @@ -180,7 +180,9 @@ class PDO extends AbstractBackend implements SyncSupport { $query = 'INSERT INTO ' . $this->addressBooksTableName . ' (uri, displayname, description, principaluri, synctoken) VALUES (:uri, :displayname, :description, :principaluri, 1)'; $stmt = $this->pdo->prepare($query); $stmt->execute($values); - return $this->pdo->lastInsertId(); + return $this->pdo->lastInsertId( + $this->addressBooksTableName . '_id_seq' + ); } @@ -230,6 +232,7 @@ class PDO extends AbstractBackend implements SyncSupport { $result = []; while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { $row['etag'] = '"' . $row['etag'] . '"'; + $row['lastmodified'] = (int)$row['lastmodified']; $result[] = $row; } return $result; @@ -258,6 +261,7 @@ class PDO extends AbstractBackend implements SyncSupport { if (!$result) return false; $result['etag'] = '"' . $result['etag'] . '"'; + $result['lastmodified'] = (int)$result['lastmodified']; return $result; } @@ -286,6 +290,7 @@ class PDO extends AbstractBackend implements SyncSupport { $result = []; while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { $row['etag'] = '"' . $row['etag'] . '"'; + $row['lastmodified'] = (int)$row['lastmodified']; $result[] = $row; } return $result; |