From: Hypolite Petovan Date: Mon, 19 Mar 2018 13:09:07 +0000 (-0400) Subject: Enable CalendarExport widget on /events X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7c48f40b75535e37be6bfcf7802fd43167cdbe4;p=friendica.git Enable CalendarExport widget on /events --- diff --git a/mod/events.php b/mod/events.php index 5f6a589d2e..cad440f164 100644 --- a/mod/events.php +++ b/mod/events.php @@ -25,21 +25,21 @@ function events_init(App $a) { return; } - if ($a->argc > 1) { - // If it's a json request abort here because we don't - // need the widget data - if ($a->argv[1] === 'json') { - return; - } + // If it's a json request abort here because we don't + // need the widget data + if ($a->argc > 1 && $a->argv[1] === 'json') { + return; + } - $cal_widget = CalendarExport::getHTML(); + if (empty($a->page['aside'])) { + $a->page['aside'] = ''; + } - if (! x($a->page,'aside')) { - $a->page['aside'] = ''; - } + $a->data['user'] = $_SESSION['user']; - $a->page['aside'] .= $cal_widget; - } + $cal_widget = CalendarExport::getHTML(); + + $a->page['aside'] .= $cal_widget; return; }