Skip to content

Commit cfba3f8

Browse files
committed
refactor(files_sharing): avoid magic numbers in external/MountProvider
Signed-off-by: Salvatore Martire <[email protected]>
1 parent 881453d commit cfba3f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/files_sharing/lib/External/MountProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use OCP\IDBConnection;
1616
use OCP\IUser;
1717
use OCP\Server;
18+
use OCP\Share\IShare;
1819

1920
class MountProvider implements IMountProvider {
2021
public const STORAGE = '\OCA\Files_Sharing\External\Storage';
@@ -54,7 +55,7 @@ public function getMountsForUser(IUser $user, IStorageFactory $loader) {
5455
$qb->select('remote', 'share_token', 'password', 'mountpoint', 'owner')
5556
->from('share_external')
5657
->where($qb->expr()->eq('user', $qb->createNamedParameter($user->getUID())))
57-
->andWhere($qb->expr()->eq('accepted', $qb->createNamedParameter(1, IQueryBuilder::PARAM_INT)));
58+
->andWhere($qb->expr()->eq('accepted', $qb->createNamedParameter(IShare::STATUS_ACCEPTED, IQueryBuilder::PARAM_INT)));
5859
$result = $qb->executeQuery();
5960
$mounts = [];
6061
while ($row = $result->fetchAssociative()) {

0 commit comments

Comments
 (0)