extract calendar app id to constant
This commit is contained in:
1 parent
de814e9530
commit
8b54abe7d4
1 file changed
+7
-1
@@ -28,6 +28,12 @@ class CalendarController extends Controller
|
|||||||
*/
|
*/
|
||||||
private const CALENDAR_NAME = 'Personal';
|
private const CALENDAR_NAME = 'Personal';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Nextcloud Calendar app id, target of the redirect
|
||||||
|
* after the event was created.
|
||||||
|
*/
|
||||||
|
private const CALENDAR_APP_ID = 'calendar';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default reminder: 15 minutes before the event starts.
|
* Default reminder: 15 minutes before the event starts.
|
||||||
*/
|
*/
|
||||||
@@ -190,7 +196,7 @@ class CalendarController extends Controller
|
|||||||
* otherwise the Nextcloud start page. linkToRoute()
|
* otherwise the Nextcloud start page. linkToRoute()
|
||||||
* would throw for a disabled Calendar app.
|
* would throw for a disabled Calendar app.
|
||||||
*/
|
*/
|
||||||
$calendarUrl = $this->appManager->isEnabledForUser('calendar', $user)
|
$calendarUrl = $this->appManager->isEnabledForUser(self::CALENDAR_APP_ID, $user)
|
||||||
? $this->urlGenerator->linkToRoute('calendar.view.index')
|
? $this->urlGenerator->linkToRoute('calendar.view.index')
|
||||||
: $this->urlGenerator->getAbsoluteURL('/');
|
: $this->urlGenerator->getAbsoluteURL('/');
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user