Skip to content

Commit

Permalink
Merge pull request #1 from rskrzypczak/master1
Browse files Browse the repository at this point in the history
Fixed files location
  • Loading branch information
mariuszkrzaczkowski authored Apr 17, 2018
2 parents 8a0b3f0 + 2d26c2f commit ffef9c3
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 62 deletions.
14 changes: 7 additions & 7 deletions iCalendar_components.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
require_once 'modules/PickList/DependentPickListUtils.php';
require_once 'modules/Users/Users.php';
require_once 'include/Webservices/Utils.php';
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/Icalendar.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarAlarm.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarEvent.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarFreebusy.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarJournal.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarTimezone.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarTodo.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/Icalendar.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarAlarm.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarEvent.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarFreebusy.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarJournal.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarTimezone.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarTodo.php');

class IcalendarComponent
{
Expand Down
94 changes: 47 additions & 47 deletions iCalendar_properties.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
<?php

// $Id: iCalendar_properties.php,v 1.13 2005/07/21 22:42:13 defacer Exp $
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyAction.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyAttach.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyAttendee.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyCalscale.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyCategories.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyClass.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyComment.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyCompleted.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyContact.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyCreated.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDaylightc.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDescription.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDtend.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDtstamp.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDtstart.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDue.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyDuration.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyExdate.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyExrule.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyFreebusy.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyGeo.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyLastmodified.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyLocation.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyMethod.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyOrganizer.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyPercentcomplete.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyPriority.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyProdid.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyRdate.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyRecurrenceid.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyRelatedto.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyRequeststatus.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyResources.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyRrule.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertySequence.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyStandardc.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyStatus.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertySummary.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyTransp.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyTrigger.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyTzid.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyTzoffsetto.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyUid.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyUrl.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyVersion.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyX.php');
Vtiger_Loader::includeOnce('~modules/Calendar/iCal/IcalendarPropertyXwralarmuid.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyAction.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyAttach.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyAttendee.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyCalscale.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyCategories.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyClass.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyComment.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyCompleted.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyContact.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyCreated.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDaylightc.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDescription.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDtend.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDtstamp.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDtstart.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDue.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyDuration.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyExdate.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyExrule.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyFreebusy.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyGeo.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyLastmodified.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyLocation.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyMethod.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyOrganizer.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyPercentcomplete.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyPriority.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyProdid.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyRdate.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyRecurrenceid.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyRelatedto.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyRequeststatus.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyResources.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyRrule.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertySequence.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyStandardc.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyStatus.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertySummary.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyTransp.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyTrigger.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyTzid.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyTzoffsetto.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyUid.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyUrl.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyVersion.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyX.php');
Vtiger_Loader::includeOnce('~vendor/yetiforce/icalendar/IcalendarPropertyXwralarmuid.php');

class IcalendarProperty
{
Expand Down
9 changes: 1 addition & 8 deletions ical-parser-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

class Ical
{
public $folders;

public function __construct()
{
$this->folders = 'cache/import/';
}

public function iCalReader($filename, $rootDirectory = '')
{
$iCaltoArray = $this->iCalDecoder($filename, $rootDirectory);
Expand All @@ -18,7 +11,7 @@ public function iCalReader($filename, $rootDirectory = '')

public function iCalDecoder($file, $rootDirectory)
{
$ical = file_get_contents($rootDirectory . $this->folders . $file);
$ical = file_get_contents($rootDirectory . $file);
preg_match_all('/BEGIN:VEVENT.*?END:VEVENT/si', $ical, $eventresult, PREG_PATTERN_ORDER);
preg_match_all('/BEGIN:VTODO.*?END:VTODO/si', $ical, $todoresult, PREG_PATTERN_ORDER);
$countEventResult = count($eventresult[0]);
Expand Down

0 comments on commit ffef9c3

Please sign in to comment.