diff options
Diffstat (limited to 'mod/events.php')
-rwxr-xr-x | mod/events.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/events.php b/mod/events.php index 08527b930..7894f960b 100755 --- a/mod/events.php +++ b/mod/events.php @@ -312,9 +312,12 @@ function events_content(&$a) { if($mode === 'ical') { - $r = q("select * from event where event_hash = '%s' and uid = %d limit 1", - dbesc($event_id), - intval(local_channel()) + + require_once('include/security.php'); + $sql_extra = permissions_sql(local_channel()); + + $r = q("select * from event where event_hash = '%s' $sql_extra limit 1", + dbesc($event_id) ); if($r) { header('Content-type: text/calendar'); |