mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
refactor(files_sharing): avoid magic numbers in external/MountProvider
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
881453dbde
commit
cfba3f8370
1 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ use OCP\Http\Client\IClientService;
|
|||
use OCP\IDBConnection;
|
||||
use OCP\IUser;
|
||||
use OCP\Server;
|
||||
use OCP\Share\IShare;
|
||||
|
||||
class MountProvider implements IMountProvider {
|
||||
public const STORAGE = '\OCA\Files_Sharing\External\Storage';
|
||||
|
|
@ -54,7 +55,7 @@ class MountProvider implements IMountProvider {
|
|||
$qb->select('remote', 'share_token', 'password', 'mountpoint', 'owner')
|
||||
->from('share_external')
|
||||
->where($qb->expr()->eq('user', $qb->createNamedParameter($user->getUID())))
|
||||
->andWhere($qb->expr()->eq('accepted', $qb->createNamedParameter(1, IQueryBuilder::PARAM_INT)));
|
||||
->andWhere($qb->expr()->eq('accepted', $qb->createNamedParameter(IShare::STATUS_ACCEPTED, IQueryBuilder::PARAM_INT)));
|
||||
$result = $qb->executeQuery();
|
||||
$mounts = [];
|
||||
while ($row = $result->fetchAssociative()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue