]> git.mxchange.org Git - friendica.git/commitdiff
Enable CalendarExport widget on /events
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 19 Mar 2018 13:09:07 +0000 (09:09 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 23 Mar 2018 10:34:21 +0000 (06:34 -0400)
mod/events.php

index 5f6a589d2e80cedd59346bfb4543a0c2f67f40bb..cad440f164c542feb6915868b0d49d18e997f277 100644 (file)
@@ -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;
 }