Skip to content

Commit

Permalink
use fresh builders when deleting storages
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Aug 14, 2023
1 parent 2ea6c53 commit fb647e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/files_external/lib/Service/DBConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,17 @@ public function removeMount($mountId) {
->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$query->execute();

$builder = $this->connection->getQueryBuilder();
$query = $builder->delete('external_applicable')
->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$query->execute();

$builder = $this->connection->getQueryBuilder();
$query = $builder->delete('external_config')
->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$query->execute();

$builder = $this->connection->getQueryBuilder();
$query = $builder->delete('external_options')
->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$query->execute();
Expand Down

0 comments on commit fb647e2

Please sign in to comment.