X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcal.php;h=6f483acc163478853847b72c36b343bccb0117d4;hb=f2ca3e5be44192c486e8e3af2a993e065ad40a7d;hp=cc6973d472cc8802a88c93152bccbb73600a8614;hpb=05be2db72516ac17dc6b9cccaa6fee458501df53;p=friendica.git diff --git a/mod/cal.php b/mod/cal.php index cc6973d472..6f483acc16 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -17,6 +17,7 @@ use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Event; use Friendica\Model\Group; +use Friendica\Model\Item; use Friendica\Model\Profile; use Friendica\Protocol\DFRN; use Friendica\Util\DateTimeFormat; @@ -142,7 +143,7 @@ function cal_content(App $a) } // get the permissions - $sql_perms = Security::item_permissions_sql($owner_uid, $remote_contact, $groups); + $sql_perms = Item::getPermissionsSQLByUserId($owner_uid, $remote_contact, $groups); // we only want to have the events of the profile owner $sql_extra = " AND `event`.`cid` = 0 " . $sql_perms; @@ -300,7 +301,7 @@ function cal_content(App $a) // Respect the export feature setting for all other /cal pages if it's not the own profile if ((local_user() !== intval($owner_uid)) && !Feature::isEnabled($owner_uid, "export_calendar")) { notice(L10n::t('Permission denied.') . EOL); - goaway('cal/' . $nick); + $a->internalRedirect('cal/' . $nick); } // Get the export data by uid @@ -321,7 +322,7 @@ function cal_content(App $a) $return_path = "cal/" . $nick; } - goaway($return_path); + $a->internalRedirect($return_path); } // If nothing went wrong we can echo the export content