diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-10-17 11:29:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 11:29:46 +0200 |
commit | 40fd76f69e601ab5579e8ce9b81318d3924dd463 (patch) | |
tree | 0209b59a3dff7bd3a50629dfb6c8376e02dc43af /apps/files_sharing | |
parent | 4100f583f03464978e622f5765bbef33e363c97f (diff) | |
parent | c254855222ca2776ccaa9c362b84295391cdd208 (diff) | |
download | nextcloud-server-40fd76f69e601ab5579e8ce9b81318d3924dd463.tar.gz nextcloud-server-40fd76f69e601ab5579e8ce9b81318d3924dd463.zip |
Merge pull request #48724 from nextcloud/dbQueriesExecStmt
chore(db): Apply query prepared statements
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedMount.php | 26 |
2 files changed, 6 insertions, 22 deletions
diff --git a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php index 44b473ac64d..ca4c82c03d7 100644 --- a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php +++ b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php @@ -36,7 +36,7 @@ class FederatedSharesDiscoverJob extends TimedJob { $qb->selectDistinct('remote') ->from('share_external'); - $result = $qb->execute(); + $result = $qb->executeQuery(); while ($row = $result->fetch()) { $this->discoveryService->discover($row['remote'], 'FEDERATED_SHARING', true); try { diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index 420de6889bf..6a5a55abed2 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -32,39 +32,23 @@ class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint */ protected $storage = null; - /** - * @var \OC\Files\View - */ - private $recipientView; - - private IUser $user; - /** @var \OCP\Share\IShare */ private $superShare; /** @var \OCP\Share\IShare[] */ private $groupedShares; - private IEventDispatcher $eventDispatcher; - - private ICache $cache; - public function __construct( $storage, array $mountpoints, $arguments, IStorageFactory $loader, - View $recipientView, + private View $recipientView, CappedMemoryCache $folderExistCache, - IEventDispatcher $eventDispatcher, - IUser $user, - ICache $cache, + private IEventDispatcher $eventDispatcher, + private IUser $user, + private ICache $cache, ) { - $this->user = $user; - $this->recipientView = $recipientView; - $this->eventDispatcher = $eventDispatcher; - $this->cache = $cache; - $this->superShare = $arguments['superShare']; $this->groupedShares = $arguments['groupedShares']; @@ -271,7 +255,7 @@ class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint ->from('filecache') ->where($builder->expr()->eq('fileid', $builder->createNamedParameter($this->getStorageRootId()))); - $result = $query->execute(); + $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); if ($row) { |