]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Event.php
Merge pull request #13161 from annando/bluesky-activities
[friendica.git] / src / Model / Event.php
index 28e325dbae31601ffbf1a844bc5e55e2e15c83e4..dc818d8f15715055392137f5151ed2e7b78fd88e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -198,7 +198,7 @@ class Event
 
        public static function sortByDate(array $event_list): array
        {
-               usort($event_list, ['self', 'compareDatesCallback']);
+               usort($event_list, [self::class, 'compareDatesCallback']);
                return $event_list;
        }
 
@@ -413,9 +413,11 @@ class Event
        {
                // First day of the week (0 = Sunday).
                $firstDay    = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'first_day_of_week') ?? 0;
+               $defaultView = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'defaultView') ?? 'month';
 
                return [
                        'firstDay'    => $firstDay,
+                       'defaultView' => $defaultView,
                        'allday'      => DI::l10n()->t('all-day'),
 
                        'Sun' => DI::l10n()->t('Sun'),
@@ -654,7 +656,7 @@ class Event
                }
 
                // Show edit and drop actions only if the user is the owner of the event and the event
-               // is a real event (no bithdays).
+               // is a real event (no birthdays).
                $edit = null;
                $copy = null;
                $drop = null;