diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-10-17 15:42:21 +0200 |
---|---|---|
committer | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-10-17 20:30:47 +0200 |
commit | a1681b0756ef784ef7056a3aae3e569a6dcae00e (patch) | |
tree | 13ad313771c95cfba750ca3f21048341c0e75105 /apps/files_trashbin | |
parent | 40fd76f69e601ab5579e8ce9b81318d3924dd463 (diff) | |
download | nextcloud-server-dbQueriesExecStmt2.tar.gz nextcloud-server-dbQueriesExecStmt2.zip |
chore(db): Apply query prepared statementsdbQueriesExecStmt2
Fix: psalm
fix: bad file
fix: bug
chore: add batch
chore: add batch
chore: add batch
fix: psalm
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/lib/Command/CleanUp.php | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/apps/files_trashbin/lib/Command/CleanUp.php b/apps/files_trashbin/lib/Command/CleanUp.php index 007e97123bf..daaa4003f7a 100644 --- a/apps/files_trashbin/lib/Command/CleanUp.php +++ b/apps/files_trashbin/lib/Command/CleanUp.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -19,25 +20,12 @@ use Symfony\Component\Console\Output\OutputInterface; class CleanUp extends Command { - /** @var IUserManager */ - protected $userManager; - - /** @var IRootFolder */ - protected $rootFolder; - - /** @var \OCP\IDBConnection */ - protected $dbConnection; - - /** - * @param IRootFolder $rootFolder - * @param IUserManager $userManager - * @param IDBConnection $dbConnection - */ - public function __construct(IRootFolder $rootFolder, IUserManager $userManager, IDBConnection $dbConnection) { + public function __construct( + protected IRootFolder $rootFolder, + protected IUserManager $userManager, + protected IDBConnection $dbConnection, + ) { parent::__construct(); - $this->userManager = $userManager; - $this->rootFolder = $rootFolder; - $this->dbConnection = $dbConnection; } protected function configure() { @@ -119,7 +107,7 @@ class CleanUp extends Command { $query->delete('files_trash') ->where($query->expr()->eq('user', $query->createParameter('uid'))) ->setParameter('uid', $uid); - $query->execute(); + $query->executeStatement(); } else { if ($verbose) { $output->writeln("No trash found for <info>$uid</info>"); |