Skip to content

Commit

Permalink
Use pre-v22 query commands
Browse files Browse the repository at this point in the history
Signed-off-by: MichaIng <micha@dietpi.com>
  • Loading branch information
MichaIng committed Nov 18, 2021
1 parent b83c947 commit ab36256
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/private/Files/Cache/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,22 +237,22 @@ public static function cleanByMountId(int $mountId) {
$query->select('storage_id')
->from('mounts')
->where($query->expr()->eq('mount_id', $query->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$storageIds = $query->executeQuery()->fetchAll(\PDO::FETCH_COLUMN);
$storageIds = $query->execute()->fetchAll(\PDO::FETCH_COLUMN);

$query = $db->getQueryBuilder();
$query->delete('filecache')
->where($query->expr()->in('storage', $query->createNamedParameter($storageIds, IQueryBuilder::PARAM_INT_ARRAY)));
$query->executeStatement();
$query->execute();

$query = $db->getQueryBuilder();
$query->delete('storages')
->where($query->expr()->eq('numeric_id', $query->createNamedParameter($storageIds, IQueryBuilder::PARAM_INT_ARRAY)));
$query->executeStatement();
$query->execute();

$query = $db->getQueryBuilder();
$query->delete('mounts')
->where($query->expr()->eq('mount_id', $query->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$query->executeStatement();
$query->execute();

$db->commit();
} catch (\Exception $e) {
Expand Down

0 comments on commit ab36256

Please sign in to comment.