]> git.mxchange.org Git - friendica.git/blobdiff - mod/events.php
Merge pull request #10332 from annando/calender-download
[friendica.git] / mod / events.php
index 291535df34b6d15f3bf2060a0b7e60766e1b76d9..2bbf4e6a3b10de0422645d97968429d2083ee25a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -59,7 +59,7 @@ function events_init(App $a)
                DI::page()['aside'] = '';
        }
 
-       $cal_widget = CalendarExport::getHTML();
+       $cal_widget = CalendarExport::getHTML(local_user());
 
        DI::page()['aside'] .= $cal_widget;
 
@@ -216,10 +216,10 @@ function events_post(App $a)
                exit();
        }
 
-       $item_id = Event::store($datarray);
+       $uri_id = Event::store($datarray);
 
        if (!$cid) {
-               Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $item_id);
+               Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$uri_id, (int)$uid);
        }
 
        DI::baseUrl()->redirect('events');
@@ -489,7 +489,7 @@ function events_content(App $a)
                $fdt = $orig_event['finish'] ?? 'now';
 
                $tz = date_default_timezone_get();
-               if (!empty($orig_event)) {
+               if (isset($orig_event['adjust'])) {
                        $tz = ($orig_event['adjust'] ? date_default_timezone_get() : 'UTC');
                }