Skip to content

Commit

Permalink
Don't filter on share type in ListReceivedShares
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Jul 10, 2023
1 parent 6ae81cd commit 398787a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ShareProvider/ScienceMeshShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,19 @@ public function getSentShares($userId): iterable {
}

public function getReceivedShares($userId): iterable {
error_log("listing received shares for user id '$userId'!");
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('*')
->from('share_external')
->where(
$qb->expr()->eq('share_type', $qb->createNamedParameter($this::SHARE_TYPE_REMOTE))
)
->andWhere(
// $qb->expr()->eq('share_type', $qb->createNamedParameter($this::SHARE_TYPE_REMOTE))
// )
// ->andWhere(
$qb->expr()->eq('user', $qb->createNamedParameter($userId))
);
$cursor = $qb->execute();
while ($data = $cursor->fetch()) {
error_log("received share!");
try {
$share = $this->createExternalShareObject($data);
} catch (InvalidShare $e) {
Expand All @@ -440,6 +442,7 @@ public function getReceivedShares($userId): iterable {

yield $share;
}
error_log("done listing received shares!");
$cursor->closeCursor();
}

Expand Down

0 comments on commit 398787a

Please sign in to comment.