summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorAndreaChirulescu <andrea.chirulescu@gmail.com>2022-03-27 11:40:20 +0200
committerAndreaChirulescu <andrea.chirulescu@gmail.com>2022-03-27 11:40:20 +0200
commite2f170c6aee1465228b3cafe74681b68116e602b (patch)
treea74c53e9874cca6277337fd6f3356fccb584d746 /includes
parent93950454195321a58ee73c796b77f380dc9d3f64 (diff)
downloadgigologadmin-e2f170c6aee1465228b3cafe74681b68116e602b.tar.gz
gigologadmin-e2f170c6aee1465228b3cafe74681b68116e602b.tar.bz2
gigologadmin-e2f170c6aee1465228b3cafe74681b68116e602b.zip
ics file gets first 20 characters from concert name
Diffstat (limited to 'includes')
-rw-r--r--includes/ical_export.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/ical_export.php b/includes/ical_export.php
index fa963bc..637bb58 100644
--- a/includes/ical_export.php
+++ b/includes/ical_export.php
@@ -17,6 +17,7 @@ if ( ! class_exists( "GiglogAdmin_IcalExport" ) )
$concert = GiglogAdmin_Concert::get($evid);
$cfullname = $concert->cname().' live at '. $concert->venue()->name() .', '.$concert->venue()->city();
+ $cshortname=substr($cfullname,0,20);
$fdate = strtotime($concert->cdate());
$newformat = date('Ymd',$fdate);
// create a new calendar
@@ -68,6 +69,7 @@ if ( ! class_exists( "GiglogAdmin_IcalExport" ) )
->createCalendar();
header( 'Content-Type: text/calendar' );
+ header( 'content-disposition: attachment;filename='.$cshortname.'.ics');
echo $vcalendarString;
die();
}