summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/carddav/carddavbackend.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-14 11:48:31 +0100
committerBjörn Schießle <bjoern@schiessle.org>2015-12-15 14:52:27 +0100
commite5469a1121e927806cabf5577f2d4d13c1f63022 (patch)
tree16a060cf632088dc55c2d7fcc856fd6d5ec621f8 /apps/dav/lib/carddav/carddavbackend.php
parentcd55a19034750a13f242f1fa59151b8894193173 (diff)
downloadnextcloud-server-e5469a1121e927806cabf5577f2d4d13c1f63022.tar.gz
nextcloud-server-e5469a1121e927806cabf5577f2d4d13c1f63022.zip
Fix Oracle insert error
Diffstat (limited to 'apps/dav/lib/carddav/carddavbackend.php')
-rw-r--r--apps/dav/lib/carddav/carddavbackend.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/carddav/carddavbackend.php b/apps/dav/lib/carddav/carddavbackend.php
index bbd76ae37ac..7f7d458d560 100644
--- a/apps/dav/lib/carddav/carddavbackend.php
+++ b/apps/dav/lib/carddav/carddavbackend.php
@@ -29,6 +29,7 @@ use Sabre\CardDAV\Backend\BackendInterface;
use Sabre\CardDAV\Backend\SyncSupport;
use Sabre\CardDAV\Plugin;
use Sabre\DAV\Exception\BadRequest;
+use Sabre\VObject\Component\VCard;
use Sabre\VObject\Reader;
class CardDavBackend implements BackendInterface, SyncSupport {
@@ -431,7 +432,7 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$query = $this->db->getQueryBuilder();
$query->insert('cards')
->values([
- 'carddata' => $query->createNamedParameter($cardData),
+ 'carddata' => $query->createNamedParameter($cardData, \PDO::PARAM_LOB),
'uri' => $query->createNamedParameter($cardUri),
'lastmodified' => $query->createNamedParameter(time()),
'addressbookid' => $query->createNamedParameter($addressBookId),
@@ -688,7 +689,7 @@ class CardDavBackend implements BackendInterface, SyncSupport {
*/
public function search($addressBookId, $pattern, $searchProperties) {
$query = $this->db->getQueryBuilder();
- $query->selectDistinct('carddata', 'c')
+ $query->selectDistinct(['carddata', 'c'])
->from($this->dbCardsTable, 'c')
->leftJoin('c', $this->dbCardsPropertiesTable, 'cp', $query->expr()->eq('cp.cardid', 'c.id'));
foreach ($searchProperties as $property) {