diff --git a/apps/dav/lib/caldav/caldavbackend.php b/apps/dav/lib/caldav/caldavbackend.php index 6af75ca064..0b70b37967 100644 --- a/apps/dav/lib/caldav/caldavbackend.php +++ b/apps/dav/lib/caldav/caldavbackend.php @@ -22,6 +22,7 @@ namespace OCA\DAV\CalDAV; +use OCP\DB\QueryBuilder\IQueryBuilder; use Sabre\CalDAV\Backend\AbstractBackend; use Sabre\CalDAV\Backend\SchedulingSupport; use Sabre\CalDAV\Backend\SubscriptionSupport; @@ -384,7 +385,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->from('calendarobjects') ->where($query->expr()->eq('calendarid', $query->createNamedParameter($calendarId))) ->andWhere($query->expr()->in('uri', $query->createParameter('uri'))) - ->setParameter('uri', $uris, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY); + ->setParameter('uri', $uris, IQueryBuilder::PARAM_STR_ARRAY); $stmt = $query->execute(); diff --git a/apps/dav/lib/carddav/carddavbackend.php b/apps/dav/lib/carddav/carddavbackend.php index 97067abb7c..44164e6125 100644 --- a/apps/dav/lib/carddav/carddavbackend.php +++ b/apps/dav/lib/carddav/carddavbackend.php @@ -25,6 +25,7 @@ namespace OCA\DAV\CardDAV; use OCA\DAV\Connector\Sabre\Principal; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use Sabre\CardDAV\Backend\BackendInterface; use Sabre\CardDAV\Backend\SyncSupport; @@ -118,7 +119,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { ->where($query->expr()->in('s.principaluri', $query->createParameter('principaluri'))) ->andWhere($query->expr()->eq('s.type', $query->createParameter('type'))) ->setParameter('type', 'addressbook') - ->setParameter('principaluri', $principals, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY) + ->setParameter('principaluri', $principals, IQueryBuilder::PARAM_STR_ARRAY) ->execute(); while($row = $result->fetch()) { @@ -423,7 +424,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { ->from('cards') ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId))) ->andWhere($query->expr()->in('uri', $query->createParameter('uri'))) - ->setParameter('uri', $uris, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY); + ->setParameter('uri', $uris, IQueryBuilder::PARAM_STR_ARRAY); $cards = []; diff --git a/lib/private/repair/cleantags.php b/lib/private/repair/cleantags.php index 7421242eb4..537c4da78a 100644 --- a/lib/private/repair/cleantags.php +++ b/lib/private/repair/cleantags.php @@ -24,6 +24,7 @@ namespace OC\Repair; use OC\Hooks\BasicEmitter; use OC\RepairStep; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; /** @@ -134,7 +135,7 @@ class CleanTags extends BasicEmitter implements RepairStep { $qb->expr()->eq('type', $qb->expr()->literal('files')) ) ->andWhere($qb->expr()->in($deleteId, $qb->createParameter('ids'))); - $qb->setParameter('ids', $items, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY); + $qb->setParameter('ids', $items, IQueryBuilder::PARAM_INT_ARRAY); $qb->execute(); } } diff --git a/lib/private/share/share.php b/lib/private/share/share.php index c695e9a156..96b920fe99 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -38,6 +38,7 @@ namespace OC\Share; use OC\Files\Filesystem; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IUserSession; use OCP\IDBConnection; use OCP\IConfig; @@ -426,7 +427,7 @@ class Share extends Constants { if (!empty($groups)) { $where = $fileDependentWhere . ' WHERE `' . $column . '` = ? AND `item_type` = ? AND `share_with` in (?)'; $arguments = array($itemSource, $itemType, $groups); - $types = array(null, null, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY); + $types = array(null, null, IQueryBuilder::PARAM_STR_ARRAY); if ($owner !== null) { $where .= ' AND `uid_owner` = ?'; diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php index 8c193c437d..3d5462792c 100644 --- a/lib/private/share20/defaultshareprovider.php +++ b/lib/private/share20/defaultshareprovider.php @@ -24,6 +24,7 @@ use OC\Share20\Exception\InvalidShare; use OC\Share20\Exception\ProviderException; use OC\Share20\Exception\ShareNotFound; use OC\Share20\Exception\BackendError; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\NotFoundException; use OCP\IGroup; use OCP\IUser; @@ -33,8 +34,6 @@ use OCP\Files\IRootFolder; use OCP\IDBConnection; use OCP\Files\Node; -use Doctrine\DBAL\Connection; - /** * Class DefaultShareProvider * @@ -520,7 +519,7 @@ class DefaultShareProvider implements IShareProvider { $qb->where($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP))); $qb->andWhere($qb->expr()->in('share_with', $qb->createNamedParameter( $groups, - Connection::PARAM_STR_ARRAY + IQueryBuilder::PARAM_STR_ARRAY ))); $cursor = $qb->execute(); @@ -697,4 +696,4 @@ class DefaultShareProvider implements IShareProvider { return $share; } -} \ No newline at end of file +} diff --git a/lib/private/systemtag/systemtagmanager.php b/lib/private/systemtag/systemtagmanager.php index 733336f4de..af912a7493 100644 --- a/lib/private/systemtag/systemtagmanager.php +++ b/lib/private/systemtag/systemtagmanager.php @@ -22,8 +22,8 @@ namespace OC\SystemTag; -use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\SystemTag\ISystemTagManager; use OCP\SystemTag\TagAlreadyExistsException; @@ -85,7 +85,7 @@ class SystemTagManager implements ISystemTagManager { ->addOrderBy('name', 'ASC') ->addOrderBy('visibility', 'ASC') ->addOrderBy('editable', 'ASC') - ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY); + ->setParameter('tagids', $tagIds, IQueryBuilder::PARAM_INT_ARRAY); $result = $query->execute(); while ($row = $result->fetch()) { @@ -252,13 +252,13 @@ class SystemTagManager implements ISystemTagManager { $query = $this->connection->getQueryBuilder(); $query->delete(SystemTagObjectMapper::RELATION_TABLE) ->where($query->expr()->in('systemtagid', $query->createParameter('tagids'))) - ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY) + ->setParameter('tagids', $tagIds, IQueryBuilder::PARAM_INT_ARRAY) ->execute(); $query = $this->connection->getQueryBuilder(); $query->delete(self::TAG_TABLE) ->where($query->expr()->in('id', $query->createParameter('tagids'))) - ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY) + ->setParameter('tagids', $tagIds, IQueryBuilder::PARAM_INT_ARRAY) ->execute(); if ($tagNotFoundException !== null) { diff --git a/lib/private/systemtag/systemtagobjectmapper.php b/lib/private/systemtag/systemtagobjectmapper.php index 4b50539f15..458b558ad9 100644 --- a/lib/private/systemtag/systemtagobjectmapper.php +++ b/lib/private/systemtag/systemtagobjectmapper.php @@ -22,8 +22,8 @@ namespace OC\SystemTag; -use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTagManager; @@ -68,7 +68,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { ->from(self::RELATION_TABLE) ->where($query->expr()->in('objectid', $query->createParameter('objectids'))) ->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype'))) - ->setParameter('objectids', $objIds, Connection::PARAM_INT_ARRAY) + ->setParameter('objectids', $objIds, IQueryBuilder::PARAM_INT_ARRAY) ->setParameter('objecttype', $objectType) ->addOrderBy('objectid', 'ASC') ->addOrderBy('systemtagid', 'ASC'); @@ -104,7 +104,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { ->from(self::RELATION_TABLE) ->where($query->expr()->in('systemtagid', $query->createParameter('tagids'))) ->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype'))) - ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY) + ->setParameter('tagids', $tagIds, IQueryBuilder::PARAM_INT_ARRAY) ->setParameter('objecttype', $objectType); $objectIds = []; @@ -162,7 +162,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { ->andWhere($query->expr()->in('systemtagid', $query->createParameter('tagids'))) ->setParameter('objectid', $objId) ->setParameter('objecttype', $objectType) - ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY) + ->setParameter('tagids', $tagIds, IQueryBuilder::PARAM_INT_ARRAY) ->execute(); } @@ -191,7 +191,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { ->where($query->expr()->in('objectid', $query->createParameter('objectids'))) ->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype'))) ->andWhere($query->expr()->eq('systemtagid', $query->createParameter('tagid'))) - ->setParameter('objectids', $objIds, Connection::PARAM_INT_ARRAY) + ->setParameter('objectids', $objIds, IQueryBuilder::PARAM_INT_ARRAY) ->setParameter('tagid', $tagId) ->setParameter('objecttype', $objectType); diff --git a/lib/private/tags.php b/lib/private/tags.php index ea5e2ca2f2..cf39a9a975 100644 --- a/lib/private/tags.php +++ b/lib/private/tags.php @@ -41,8 +41,9 @@ namespace OC; -use \OC\Tagging\Tag; -use \OC\Tagging\TagMapper; +use OC\Tagging\Tag; +use OC\Tagging\TagMapper; +use OCP\DB\QueryBuilder\IQueryBuilder; class Tags implements \OCP\ITags { @@ -223,7 +224,7 @@ class Tags implements \OCP\ITags { 'FROM `' . self::RELATION_TABLE . '` r, `' . self::TAG_TABLE . '` ' . 'WHERE `categoryid` = `id` AND `uid` = ? AND r.`type` = ? AND `objid` IN (?)', array($this->user, $this->type, $chunk), - array(null, null, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY) + array(null, null, IQueryBuilder::PARAM_INT_ARRAY) ); while ($row = $result->fetch()) { $objId = (int)$row['objid'];