diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-12 11:05:05 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2020-04-15 15:49:12 +0200 |
commit | 2e9f105786e99ac163ec3dcb3a6b89f0c2261097 (patch) | |
tree | 5307e3e78690839081790109e575820655a5ad38 /apps/dav | |
parent | c914ae4c8d0aa868ac8102127696b9bbed47e0f8 (diff) | |
download | nextcloud-server-2e9f105786e99ac163ec3dcb3a6b89f0c2261097.tar.gz nextcloud-server-2e9f105786e99ac163ec3dcb3a6b89f0c2261097.zip |
Use table variable everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 71b7e846f3d..7abfd64ed70 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -449,7 +449,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { */ public function deleteAddressBook($addressBookId) { $query = $this->db->getQueryBuilder(); - $query->delete('cards') + $query->delete($this->dbCardsTable) ->where($query->expr()->eq('addressbookid', $query->createParameter('addressbookid'))) ->setParameter('addressbookid', $addressBookId) ->execute(); @@ -493,7 +493,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { public function getCards($addressBookId) { $query = $this->db->getQueryBuilder(); $query->select(['id', 'uri', 'lastmodified', 'etag', 'size', 'carddata', 'uid']) - ->from('cards') + ->from($this->dbCardsTable) ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId))); $cards = []; @@ -524,7 +524,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { public function getCard($addressBookId, $cardUri) { $query = $this->db->getQueryBuilder(); $query->select(['id', 'uri', 'lastmodified', 'etag', 'size', 'carddata', 'uid']) - ->from('cards') + ->from($this->dbCardsTable) ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId))) ->andWhere($query->expr()->eq('uri', $query->createNamedParameter($cardUri))) ->setMaxResults(1); @@ -562,7 +562,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $query = $this->db->getQueryBuilder(); $query->select(['id', 'uri', 'lastmodified', 'etag', 'size', 'carddata', 'uid']) - ->from('cards') + ->from($this->dbCardsTable) ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId))) ->andWhere($query->expr()->in('uri', $query->createParameter('uri'))); @@ -611,7 +611,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $q = $this->db->getQueryBuilder(); $q->select('uid') - ->from('cards') + ->from($this->dbCardsTable) ->where($q->expr()->eq('addressbookid', $q->createNamedParameter($addressBookId))) ->andWhere($q->expr()->eq('uid', $q->createNamedParameter($uid))) ->setMaxResults(1); @@ -676,7 +676,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $uid = $this->getUID($cardData); $etag = md5($cardData); $query = $this->db->getQueryBuilder(); - $query->update('cards') + $query->update($this->dbCardsTable) ->set('carddata', $query->createNamedParameter($cardData, IQueryBuilder::PARAM_LOB)) ->set('lastmodified', $query->createNamedParameter(time())) ->set('size', $query->createNamedParameter(strlen($cardData))) @@ -712,7 +712,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $cardId = null; } $query = $this->db->getQueryBuilder(); - $ret = $query->delete('cards') + $ret = $query->delete($this->dbCardsTable) ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId))) ->andWhere($query->expr()->eq('uri', $query->createNamedParameter($cardUri))) ->execute(); |