diff options
Diffstat (limited to 'lib/private/Repair/RemoveLinkShares.php')
-rw-r--r-- | lib/private/Repair/RemoveLinkShares.php | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php index 634494acb2f..a07ebdb72c3 100644 --- a/lib/private/Repair/RemoveLinkShares.php +++ b/lib/private/Repair/RemoveLinkShares.php @@ -19,31 +19,17 @@ use OCP\Migration\IRepairStep; use OCP\Notification\IManager; class RemoveLinkShares implements IRepairStep { - /** @var IDBConnection */ - private $connection; - /** @var IConfig */ - private $config; /** @var string[] */ private $userToNotify = []; - /** @var IGroupManager */ - private $groupManager; - /** @var IManager */ - private $notificationManager; - /** @var ITimeFactory */ - private $timeFactory; - - public function __construct(IDBConnection $connection, - IConfig $config, - IGroupManager $groupManager, - IManager $notificationManager, - ITimeFactory $timeFactory) { - $this->connection = $connection; - $this->config = $config; - $this->groupManager = $groupManager; - $this->notificationManager = $notificationManager; - $this->timeFactory = $timeFactory; - } + public function __construct( + private IDBConnection $connection, + private IConfig $config, + private IGroupManager $groupManager, + private IManager $notificationManager, + private ITimeFactory $timeFactory, + ) { + } public function getName(): string { return 'Remove potentially over exposing share links'; @@ -74,7 +60,7 @@ class RemoveLinkShares implements IRepairStep { $qb = $this->connection->getQueryBuilder(); $qb->delete('share') ->where($qb->expr()->eq('id', $qb->createNamedParameter($id))); - $qb->execute(); + $qb->executeStatement(); } /** @@ -107,7 +93,7 @@ class RemoveLinkShares implements IRepairStep { ->from('share') ->where($query->expr()->in('id', $query->createFunction($subQuery->getSQL()))); - $result = $query->execute(); + $result = $query->executeQuery(); $data = $result->fetch(); $result->closeCursor(); @@ -137,7 +123,7 @@ class RemoveLinkShares implements IRepairStep { )) ->andWhere($query->expr()->eq('s1.item_source', 's2.item_source')); /** @var IResult $result */ - $result = $query->execute(); + $result = $query->executeQuery(); return $result; } |