This commit is contained in:
@@ -176,6 +176,7 @@ final class AccountPages
|
||||
$profileSettings = $pdo ? new ProfileSettings($pdo) : null;
|
||||
$systemSettings = $pdo ? new SystemSettings($pdo) : null;
|
||||
$listingCatalog = $pdo ? new ListingCatalog($pdo) : null;
|
||||
$calendarSync = $pdo ? new CalendarSync($app) : null;
|
||||
$section = (string)($_GET['section'] ?? 'profile');
|
||||
$canManageSystemSettings = $communityAccess ? $communityAccess->canManageApplications($userId) : false;
|
||||
$allowedSections = ['profile', 'children', 'events', 'places', 'community', 'settings'];
|
||||
@@ -189,6 +190,9 @@ final class AccountPages
|
||||
if ($listingCatalog) {
|
||||
$listingCatalog->ensureSchema();
|
||||
}
|
||||
if ($calendarSync) {
|
||||
$calendarSync->ensureSchema();
|
||||
}
|
||||
if ($pdo) {
|
||||
self::ensureLegacyEventSchema($pdo);
|
||||
}
|
||||
@@ -785,6 +789,13 @@ final class AccountPages
|
||||
$section = 'profile';
|
||||
}
|
||||
$avatarBuilder = AvatarManager::builderStyles($profile);
|
||||
$calendarExportUrl = null;
|
||||
$calendarFeedUrl = null;
|
||||
if ($calendarSync) {
|
||||
$calendarToken = $calendarSync->getOrCreateFeedToken($userId);
|
||||
$calendarExportUrl = CalendarSync::buildAbsoluteUrl('/calendar/export');
|
||||
$calendarFeedUrl = CalendarSync::buildAbsoluteUrl('/calendar/feed?token=' . rawurlencode($calendarToken));
|
||||
}
|
||||
|
||||
return compact(
|
||||
'flash',
|
||||
@@ -813,6 +824,8 @@ final class AccountPages
|
||||
'systemSettingsValues',
|
||||
'listingCatalogStatus',
|
||||
'avatarBuilder',
|
||||
'calendarExportUrl',
|
||||
'calendarFeedUrl',
|
||||
'section',
|
||||
'allowedSections'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user