Use new constants
This commit is contained in:
parent
644a8ab797
commit
0c7922cf70
1 changed files with 8 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue