summaryrefslogtreecommitdiffstats
path: root/includes/ical_export.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:45:35 +0100
committerHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:45:35 +0100
commitc2c053d542f98d90119baf60371138ec5f530161 (patch)
tree52895ef11de3cb6d9746288accbbbf5ab9b92e99 /includes/ical_export.php
parenta5d22a6a019a679689e74d3eb226cb2146ae0e3d (diff)
downloadgigologadmin-c2c053d542f98d90119baf60371138ec5f530161.tar.gz
gigologadmin-c2c053d542f98d90119baf60371138ec5f530161.tar.bz2
gigologadmin-c2c053d542f98d90119baf60371138ec5f530161.zip
Reindent includes/ical_export.php
Diffstat (limited to 'includes/ical_export.php')
-rw-r--r--includes/ical_export.php91
1 files changed, 45 insertions, 46 deletions
diff --git a/includes/ical_export.php b/includes/ical_export.php
index c56e349..2c2d4de 100644
--- a/includes/ical_export.php
+++ b/includes/ical_export.php
@@ -12,7 +12,6 @@ if ( ! class_exists( "GiglogAdmin_IcalExport" ) )
class Giglogadmin_IcalExport
{
public static function export_ical()
-
{
$evid = $_GET['evid'];
@@ -22,58 +21,58 @@ if ( ! class_exists( "GiglogAdmin_IcalExport" ) )
$newformat = date('Ymd',$fdate);
// create a new calendar
$vcalendar = Vcalendar::factory( [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ] )
- // with calendaring info
- ->setMethod( Vcalendar::PUBLISH )
- ->setXprop(
- Vcalendar::X_WR_CALNAME,
- "Calendar Sample"
+ // with calendaring info
+ ->setMethod( Vcalendar::PUBLISH )
+ ->setXprop(
+ Vcalendar::X_WR_CALNAME,
+ "Calendar Sample"
)
->setXprop(
Vcalendar::X_WR_CALDESC,
"Concert ".$cfullname . ""
- )
- ->setXprop(
- Vcalendar::X_WR_RELCALID,
- "3E26604A-50F4-4449-8B3E-E4F4932D05B5"
- )
- ->setXprop(
- Vcalendar::X_WR_TIMEZONE,
- "Europe/Oslo"
- );
+ )
+ ->setXprop(
+ Vcalendar::X_WR_RELCALID,
+ "3E26604A-50F4-4449-8B3E-E4F4932D05B5"
+ )
+ ->setXprop(
+ Vcalendar::X_WR_TIMEZONE,
+ "Europe/Oslo"
+ );
- // create a new event
- $event1 = $vcalendar->newVevent()
- ->setTransp( Vcalendar::OPAQUE )
- ->setClass( Vcalendar::P_BLIC )
- ->setSequence( 1 )
- // describe the event
- ->setSummary("".$cfullname."" )
- ->setDescription("".$cfullname."" )
- ->setComment ("".$cfullname."" )
- // place the event
- ->setLocation( "".$concert->venue()->name() .', '.$concert->venue()->city() ."" )
- // set the time
- ->setDtstart(
- new DateTime(
- $newformat.'T190000',
- new DateTimezone( 'Europe/Oslo' )
- )
+ // create a new event
+ $event1 = $vcalendar->newVevent()
+ ->setTransp( Vcalendar::OPAQUE )
+ ->setClass( Vcalendar::P_BLIC )
+ ->setSequence( 1 )
+ // describe the event
+ ->setSummary("".$cfullname."" )
+ ->setDescription("".$cfullname."" )
+ ->setComment ("".$cfullname."" )
+ // place the event
+ ->setLocation( "".$concert->venue()->name() .', '.$concert->venue()->city() ."" )
+ // set the time
+ ->setDtstart(
+ new DateTime(
+ $newformat.'T190000',
+ new DateTimezone( 'Europe/Oslo' )
+ )
)
->setDuration ("PT4H")
- ;
- $vcalendarString =
- // apply appropriate Vtimezone with Standard/DayLight components
- $vcalendar->vtimezonePopulate()
- // and create the (string) calendar
- ->createCalendar();
+ ;
+ $vcalendarString =
+ // apply appropriate Vtimezone with Standard/DayLight components
+ $vcalendar->vtimezonePopulate()
+ // and create the (string) calendar
+ ->createCalendar();
- header( 'Content-Type: text/calendar' );
- echo $vcalendarString;
- die();
- }
- }
+ header( 'Content-Type: text/calendar' );
+ echo $vcalendarString;
+ die();
+ }
+ }
- add_action( 'wp_ajax_nopriv_giglog_export_ical', [ 'GiglogAdmin_IcalExport', 'export_ical' ] );
- add_action( 'wp_ajax_giglog_export_ical', [ 'GiglogAdmin_IcalExport', 'export_ical' ] );
- }
+ add_action( 'wp_ajax_nopriv_giglog_export_ical', [ 'GiglogAdmin_IcalExport', 'export_ical' ] );
+ add_action( 'wp_ajax_giglog_export_ical', [ 'GiglogAdmin_IcalExport', 'export_ical' ] );
+}