diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-26 14:50:57 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-27 12:53:44 +0100 |
commit | 0c7922cf7071b45c5eed782aa8e84416ea91a1ad (patch) | |
tree | 241df1ab42699f10c2c1a2a3e5b3dbeeef9277c1 /lib/private/files | |
parent | 644a8ab797fb39847638048c887c2c358c962f62 (diff) | |
download | nextcloud-server-0c7922cf7071b45c5eed782aa8e84416ea91a1ad.tar.gz nextcloud-server-0c7922cf7071b45c5eed782aa8e84416ea91a1ad.zip |
Use new constants
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/config/usermountcache.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php index 1d1589380da..7d7b03fbc06 100644 --- a/lib/private/files/config/usermountcache.php +++ b/lib/private/files/config/usermountcache.php @@ -23,6 +23,7 @@ namespace OC\Files\Config; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; use OC\Files\Filesystem; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Config\ICachedMountInfo; use OCP\Files\Config\IUserMountCache; use OCP\Files\Mount\IMountPoint; @@ -137,7 +138,7 @@ class UserMountCache implements IUserMountCache { $query = $builder->update('mounts') ->set('mount_point', $builder->createNamedParameter($mount->getMountPoint())) ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($mount->getUser()->getUID()))) - ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), \PDO::PARAM_INT))); + ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), IQueryBuilder::PARAM_INT))); $query->execute(); } @@ -147,7 +148,7 @@ class UserMountCache implements IUserMountCache { $query = $builder->delete('mounts') ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($mount->getUser()->getUID()))) - ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), \PDO::PARAM_INT))); + ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), IQueryBuilder::PARAM_INT))); $query->execute(); } @@ -182,7 +183,7 @@ class UserMountCache implements IUserMountCache { $builder = $this->connection->getQueryBuilder(); $query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point') ->from('mounts') - ->where($builder->expr()->eq('storage_id', $builder->createPositionalParameter($numericStorageId, \PDO::PARAM_INT))); + ->where($builder->expr()->eq('storage_id', $builder->createPositionalParameter($numericStorageId, IQueryBuilder::PARAM_INT))); $rows = $query->execute()->fetchAll(); @@ -197,7 +198,7 @@ class UserMountCache implements IUserMountCache { $builder = $this->connection->getQueryBuilder(); $query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point') ->from('mounts') - ->where($builder->expr()->eq('root_id', $builder->createPositionalParameter($rootFileId, \PDO::PARAM_INT))); + ->where($builder->expr()->eq('root_id', $builder->createPositionalParameter($rootFileId, IQueryBuilder::PARAM_INT))); $rows = $query->execute()->fetchAll(); @@ -214,7 +215,7 @@ class UserMountCache implements IUserMountCache { $builder = $this->connection->getQueryBuilder(); $query = $builder->select('storage', 'path') ->from('filecache') - ->where($builder->expr()->eq('fileid', $builder->createNamedParameter($fileId, \PDO::PARAM_INT))); + ->where($builder->expr()->eq('fileid', $builder->createNamedParameter($fileId, IQueryBuilder::PARAM_INT))); $row = $query->execute()->fetch(); if (is_array($row)) { @@ -276,7 +277,7 @@ class UserMountCache implements IUserMountCache { $query = $builder->delete('mounts') ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($userId))) - ->andWhere($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, \PDO::PARAM_INT))); + ->andWhere($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))); $query->execute(); } @@ -284,7 +285,7 @@ class UserMountCache implements IUserMountCache { $builder = $this->connection->getQueryBuilder(); $query = $builder->delete('mounts') - ->where($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, \PDO::PARAM_INT))); + ->where($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))); $query->execute(); } } |