diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-25 17:17:36 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-25 17:17:36 +0100 |
commit | 09ae1604637127189e7aaf6777243e8b84a89dd8 (patch) | |
tree | 17a90b98b43dd32538e050b9483e8675906b52c3 /lib | |
parent | c5046fb2a9e3cfd6c7a019517a9eff17fa6033c5 (diff) | |
download | nextcloud-server-09ae1604637127189e7aaf6777243e8b84a89dd8.tar.gz nextcloud-server-09ae1604637127189e7aaf6777243e8b84a89dd8.zip |
Replace other usages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/repair/cleantags.php | 3 | ||||
-rw-r--r-- | lib/private/share/share.php | 3 | ||||
-rw-r--r-- | lib/private/share20/defaultshareprovider.php | 7 | ||||
-rw-r--r-- | lib/private/systemtag/systemtagmanager.php | 8 | ||||
-rw-r--r-- | lib/private/systemtag/systemtagobjectmapper.php | 10 | ||||
-rw-r--r-- | lib/private/tags.php | 7 |
6 files changed, 20 insertions, 18 deletions
diff --git a/lib/private/repair/cleantags.php b/lib/private/repair/cleantags.php index 7421242eb48..537c4da78aa 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 c695e9a156b..96b920fe994 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 8c193c437d3..3d5462792cd 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 733336f4de9..af912a74936 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 4b50539f155..458b558ad97 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 ea5e2ca2f2b..cf39a9a9759 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']; |