X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget%2FCalendarExport.php;h=2c21b2f0d0ab7e2d1b2f59194e87e038d27437cb;hb=cbfc3d0c28e0b55c3ccf1ddfd321798a8c2532e8;hp=2129cd515c3cddc88eb6d43bfe9f1e0aebb8aa8a;hpb=d36bc29ce97927d87b594b7296f8bc3a1eaa2a10;p=friendica.git diff --git a/src/Content/Widget/CalendarExport.php b/src/Content/Widget/CalendarExport.php index 2129cd515c..2c21b2f0d0 100644 --- a/src/Content/Widget/CalendarExport.php +++ b/src/Content/Widget/CalendarExport.php @@ -27,6 +27,10 @@ class CalendarExport public static function getHTML() { $a = get_app(); + if (empty($a->data['user'])) { + return; + } + $owner_uid = $a->data['user']['uid']; // The permission testing is a little bit tricky because we have to respect many cases. @@ -36,6 +40,10 @@ class CalendarExport return; } + /* + * If it's a kind of profile page (intval($owner_uid)) return if the user not logged in and + * export feature isn't enabled. + */ /* * Cal logged in user (test permission at foreign profile page). * If the $owner uid is available we know it is part of one of the profile pages (like /cal).