@@ -37,47 +37,47 @@ |
||
37 | 37 | |
38 | 38 | class AcceptController extends Controller { |
39 | 39 | |
40 | - /** @var ShareManager */ |
|
41 | - private $shareManager; |
|
40 | + /** @var ShareManager */ |
|
41 | + private $shareManager; |
|
42 | 42 | |
43 | - /** @var IUserSession */ |
|
44 | - private $userSession; |
|
43 | + /** @var IUserSession */ |
|
44 | + private $userSession; |
|
45 | 45 | |
46 | - /** @var IURLGenerator */ |
|
47 | - private $urlGenerator; |
|
46 | + /** @var IURLGenerator */ |
|
47 | + private $urlGenerator; |
|
48 | 48 | |
49 | - public function __construct(IRequest $request, ShareManager $shareManager, IUserSession $userSession, IURLGenerator $urlGenerator) { |
|
50 | - parent::__construct(Application::APP_ID, $request); |
|
49 | + public function __construct(IRequest $request, ShareManager $shareManager, IUserSession $userSession, IURLGenerator $urlGenerator) { |
|
50 | + parent::__construct(Application::APP_ID, $request); |
|
51 | 51 | |
52 | - $this->shareManager = $shareManager; |
|
53 | - $this->userSession = $userSession; |
|
54 | - $this->urlGenerator = $urlGenerator; |
|
55 | - } |
|
52 | + $this->shareManager = $shareManager; |
|
53 | + $this->userSession = $userSession; |
|
54 | + $this->urlGenerator = $urlGenerator; |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * @NoAdminRequired |
|
59 | - * @NoCSRFRequired |
|
60 | - */ |
|
61 | - public function accept(string $shareId): Response { |
|
62 | - try { |
|
63 | - $share = $this->shareManager->getShareById($shareId); |
|
64 | - } catch (ShareNotFound $e) { |
|
65 | - return new NotFoundResponse(); |
|
66 | - } |
|
57 | + /** |
|
58 | + * @NoAdminRequired |
|
59 | + * @NoCSRFRequired |
|
60 | + */ |
|
61 | + public function accept(string $shareId): Response { |
|
62 | + try { |
|
63 | + $share = $this->shareManager->getShareById($shareId); |
|
64 | + } catch (ShareNotFound $e) { |
|
65 | + return new NotFoundResponse(); |
|
66 | + } |
|
67 | 67 | |
68 | - $user = $this->userSession->getUser(); |
|
69 | - if ($user === null) { |
|
70 | - return new NotFoundResponse(); |
|
71 | - } |
|
68 | + $user = $this->userSession->getUser(); |
|
69 | + if ($user === null) { |
|
70 | + return new NotFoundResponse(); |
|
71 | + } |
|
72 | 72 | |
73 | - try { |
|
74 | - $share = $this->shareManager->acceptShare($share, $user->getUID()); |
|
75 | - } catch (\Exception $e) { |
|
76 | - // Just ignore |
|
77 | - } |
|
73 | + try { |
|
74 | + $share = $this->shareManager->acceptShare($share, $user->getUID()); |
|
75 | + } catch (\Exception $e) { |
|
76 | + // Just ignore |
|
77 | + } |
|
78 | 78 | |
79 | - $url = $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $share->getNode()->getId()]); |
|
79 | + $url = $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $share->getNode()->getId()]); |
|
80 | 80 | |
81 | - return new RedirectResponse($url); |
|
82 | - } |
|
81 | + return new RedirectResponse($url); |
|
82 | + } |
|
83 | 83 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Groupware implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'places/contacts.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'places/contacts.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'groupware'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'groupware'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Groupware'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Groupware'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 50; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 50; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Additional implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'additional'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'additional'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Additional settings'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Additional settings'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 98; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 98; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Sharing implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'sharing'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'sharing'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Sharing'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Sharing'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 5; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 5; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Security implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/password.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/password.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'security'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'security'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Security'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Security'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 10; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 10; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Server implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'server'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'server'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Basic settings'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Basic settings'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 1; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 1; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Overview implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('settings', 'admin.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('settings', 'admin.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'overview'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'overview'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Overview'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Overview'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 0; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 0; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class SyncClients implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon() { |
|
45 | - return $this->urlGenerator->imagePath('core', 'clients/phone.svg'); |
|
46 | - } |
|
44 | + public function getIcon() { |
|
45 | + return $this->urlGenerator->imagePath('core', 'clients/phone.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'sync-clients'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'sync-clients'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Mobile & desktop'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Mobile & desktop'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 15; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 15; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Security implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon() { |
|
45 | - return $this->urlGenerator->imagePath('settings', 'password.svg'); |
|
46 | - } |
|
44 | + public function getIcon() { |
|
45 | + return $this->urlGenerator->imagePath('settings', 'password.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'security'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'security'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Security'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Security'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 5; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 5; |
|
58 | + } |
|
59 | 59 | } |