Merge pull request #146 from coletivoEITA/getSharesByPath

Implemented method ShareByCircleProvider->getSharesByPath
This commit is contained in:
Maxence Lange 2017-11-13 08:16:54 -01:00 committed by GitHub
commit 726ac6b100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,7 +414,17 @@ class ShareByCircleProvider extends CircleProviderRequest implements IShareProvi
* @return IShare[]|null
*/
public function getSharesByPath(Node $path) {
return null;
$qb = $this->getBaseSelectSql();
$this->limitToFiles($qb, [$path->getId()]);
$cursor = $qb->execute();
$shares = [];
while ($data = $cursor->fetch()) {
$shares[] = $this->createShareObject($data);
}
$cursor->closeCursor();
return $shares;
}