]> git.mxchange.org Git - friendica.git/blobdiff - mod/cal.php
Merge pull request #5830 from nupplaphil/update_from_boot
[friendica.git] / mod / cal.php
index cc6973d472cc8802a88c93152bccbb73600a8614..6f483acc163478853847b72c36b343bccb0117d4 100644 (file)
@@ -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