Fixed Bug #65489: TYPO3 6.2 compatibility
authormario_matzulla <mario_matzulla@735d13b6-9817-0410-8766-e36946ffe9aa>
Sat, 4 Jul 2015 20:56:45 +0000 (20:56 +0000)
committermario_matzulla <mario_matzulla@735d13b6-9817-0410-8766-e36946ffe9aa>
Sat, 4 Jul 2015 20:56:45 +0000 (20:56 +0000)
Restructured to extbase structure
Sphinx documentation

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/caldav/trunk@89345 735d13b6-9817-0410-8766-e36946ffe9aa

58 files changed:
ChangeLog [deleted file]
Classes/Backend/Modul/IcsGeneratorModul.php [new file with mode: 0644]
Classes/Backend/Modul/clear.gif [new file with mode: 0644]
Classes/Backend/Modul/conf.php [new file with mode: 0644]
Classes/Backend/Modul/index.php [new file with mode: 0644]
Classes/Backend/Modul/moduleicon.gif [new file with mode: 0644]
Classes/Hooks/TceMainProcessdatamap.php [new file with mode: 0644]
Classes/Service/IcsGenerator.php [new file with mode: 0644]
Documentation/Changelog/0-0-1.rst [new file with mode: 0644]
Documentation/Changelog/1-0-0.rst [new file with mode: 0644]
Documentation/Changelog/Index.rst [new file with mode: 0644]
Documentation/Images/extension_option.png [new file with mode: 0644]
Documentation/Images/frontend_user_calendar.png [new file with mode: 0644]
Documentation/Images/info.png [new file with mode: 0644]
Documentation/Images/link.jpg [new file with mode: 0644]
Documentation/Images/note.png [new file with mode: 0644]
Documentation/Images/rtfm.png [new file with mode: 0644]
Documentation/Images/warn.png [new file with mode: 0644]
Documentation/Includes.txt [new file with mode: 0644]
Documentation/Index.rst [new file with mode: 0644]
Documentation/Installation/Index.rst [new file with mode: 0644]
Documentation/Installation/Step1InstallExtension/Images.txt [new file with mode: 0644]
Documentation/Installation/Step1InstallExtension/Index.rst [new file with mode: 0644]
Documentation/Installation/Step2ConfigurePrivateCalendar/Images.txt [new file with mode: 0644]
Documentation/Installation/Step2ConfigurePrivateCalendar/Index.rst [new file with mode: 0644]
Documentation/Installation/Step3Htaccess/Index.rst [new file with mode: 0644]
Documentation/Introduction/AWelcome/Index.rst [new file with mode: 0644]
Documentation/Introduction/BAboutThisManual/Index.rst [new file with mode: 0644]
Documentation/Introduction/CHowToUseThisManual/Images.txt [new file with mode: 0644]
Documentation/Introduction/CHowToUseThisManual/Index.rst [new file with mode: 0644]
Documentation/Introduction/Index.rst [new file with mode: 0644]
Documentation/Overview/HowToGetHelp/Index.rst [new file with mode: 0644]
Documentation/Overview/Index.rst [new file with mode: 0644]
Documentation/Overview/WhatDoesItDo/Index.rst [new file with mode: 0644]
Documentation/Settings.yml [new file with mode: 0644]
Documentation/Usage/Index.rst [new file with mode: 0644]
Resources/Private/Language/locallang_db.xml [new file with mode: 0644]
Resources/Private/Language/locallang_ics_generator.xml [new file with mode: 0644]
Resources/Private/Language/locallang_ics_generator_mod.xml [new file with mode: 0644]
_htaccess [new file with mode: 0644]
caldav.php
doc/manual.sxw [deleted file]
ext_autoload.php [deleted file]
ext_emconf.php
ext_localconf.php
ext_tables.php
hooks/class.tx_caldav_tcemain_processdatamap.php [deleted file]
lib/Sabre/CalDAV/Backend/TYPO3.php
lib/Sabre/DAV/Auth/Backend/TYPO3.php
lib/Sabre/DAVACL/PrincipalBackend/TYPO3.php
locallang_db.xml [deleted file]
mod1/class.tx_cal_ics_generator.php [deleted file]
mod1/clear.gif [deleted file]
mod1/conf.php [deleted file]
mod1/index.php [deleted file]
mod1/locallang.xml [deleted file]
mod1/locallang_mod.xml [deleted file]
mod1/moduleicon.gif [deleted file]

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index 5b87d83..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,120 +0,0 @@
-2011-05-03  jeff
-
-       * ext_icon.gif: Updated extension icon.
-       * ext_emconf.php: Raised state to beta.
-       * ChangeLog, LICENSE, lib/ChangeLog, lib/LICENSE: Moved external
-         license and changelog files into lib directory.
-
-2011-02-10  mario
-
-       * doc/manual.sxw, ext_conf_template.txt: updated pid configuration
-
-2010-11-16  mario
-
-       * doc/manual.sxw: updated manual
-
-2010-11-13  mario
-
-       * ext_emconf.php: added dependency version for cal
-       * ext_emconf.php: updated version and md5 values
-       * ext_tables.sql: fixed sql
-       * doc, doc/manual.sxw: added docu
-
-2010-11-10  mario
-
-       * ext_conf_template.txt, lib/Sabre/DAV/Auth/Backend/TYPO3.php:
-         switched from digest to basic auth -> using TYPO3 auth
-
-2010-11-01  mario
-
-       * .buildpath, .project, ChangeLog, LICENSE, _htaccess, caldav.php,
-         ext_autoload.php, ext_emconf.php, ext_icon.gif,
-         ext_localconf.php, ext_tables.php, ext_tables.sql, hooks,
-         hooks/class.tx_caldav_tcemain_processdatamap.php, lib, lib/Sabre,
-         lib/Sabre.autoload.php, lib/Sabre.includes.php, lib/Sabre/CalDAV,
-         lib/Sabre/CalDAV/Backend, lib/Sabre/CalDAV/Backend/Abstract.php,
-         lib/Sabre/CalDAV/Backend/PDO.php,
-         lib/Sabre/CalDAV/Backend/TYPO3.php,
-         lib/Sabre/CalDAV/Calendar.php,
-         lib/Sabre/CalDAV/CalendarObject.php,
-         lib/Sabre/CalDAV/CalendarRootNode.php,
-         lib/Sabre/CalDAV/Exception,
-         lib/Sabre/CalDAV/Exception/InvalidICalendarObject.php,
-         lib/Sabre/CalDAV/ICalendarUtil.php, lib/Sabre/CalDAV/Plugin.php,
-         lib/Sabre/CalDAV/Property,
-         lib/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php,
-         lib/Sabre/CalDAV/Property/SupportedCalendarData.php,
-         lib/Sabre/CalDAV/Property/SupportedCollationSet.php,
-         lib/Sabre/CalDAV/Server.php, lib/Sabre/CalDAV/TYPO3Server.php,
-         lib/Sabre/CalDAV/UserCalendars.php, lib/Sabre/CalDAV/Version.php,
-         lib/Sabre/CalDAV/XMLUtil.php, lib/Sabre/DAV, lib/Sabre/DAV/Auth,
-         lib/Sabre/DAV/Auth/Backend,
-         lib/Sabre/DAV/Auth/Backend/Abstract.php,
-         lib/Sabre/DAV/Auth/Backend/AbstractBasic.php,
-         lib/Sabre/DAV/Auth/Backend/AbstractDigest.php,
-         lib/Sabre/DAV/Auth/Backend/Apache.php,
-         lib/Sabre/DAV/Auth/Backend/File.php,
-         lib/Sabre/DAV/Auth/Backend/PDO.php,
-         lib/Sabre/DAV/Auth/Backend/TYPO3.php,
-         lib/Sabre/DAV/Auth/Plugin.php, lib/Sabre/DAV/Auth/Principal.php,
-         lib/Sabre/DAV/Auth/PrincipalCollection.php,
-         lib/Sabre/DAV/Browser,
-         lib/Sabre/DAV/Browser/GuessContentType.php,
-         lib/Sabre/DAV/Browser/MapGetToPropFind.php,
-         lib/Sabre/DAV/Browser/Plugin.php, lib/Sabre/DAV/Directory.php,
-         lib/Sabre/DAV/Exception, lib/Sabre/DAV/Exception.php,
-         lib/Sabre/DAV/Exception/BadRequest.php,
-         lib/Sabre/DAV/Exception/Conflict.php,
-         lib/Sabre/DAV/Exception/ConflictingLock.php,
-         lib/Sabre/DAV/Exception/FileNotFound.php,
-         lib/Sabre/DAV/Exception/Forbidden.php,
-         lib/Sabre/DAV/Exception/InsufficientStorage.php,
-         lib/Sabre/DAV/Exception/InvalidResourceType.php,
-         lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php,
-         lib/Sabre/DAV/Exception/Locked.php,
-         lib/Sabre/DAV/Exception/MethodNotAllowed.php,
-         lib/Sabre/DAV/Exception/NotAuthenticated.php,
-         lib/Sabre/DAV/Exception/NotImplemented.php,
-         lib/Sabre/DAV/Exception/PreconditionFailed.php,
-         lib/Sabre/DAV/Exception/ReportNotImplemented.php,
-         lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php,
-         lib/Sabre/DAV/Exception/UnsupportedMediaType.php,
-         lib/Sabre/DAV/FS, lib/Sabre/DAV/FS/Directory.php,
-         lib/Sabre/DAV/FS/File.php, lib/Sabre/DAV/FS/Node.php,
-         lib/Sabre/DAV/FSExt, lib/Sabre/DAV/FSExt/Directory.php,
-         lib/Sabre/DAV/FSExt/File.php, lib/Sabre/DAV/FSExt/Node.php,
-         lib/Sabre/DAV/File.php, lib/Sabre/DAV/ICollection.php,
-         lib/Sabre/DAV/IExtendedCollection.php, lib/Sabre/DAV/IFile.php,
-         lib/Sabre/DAV/ILockable.php, lib/Sabre/DAV/INode.php,
-         lib/Sabre/DAV/IProperties.php, lib/Sabre/DAV/IQuota.php,
-         lib/Sabre/DAV/Locks, lib/Sabre/DAV/Locks/Backend,
-         lib/Sabre/DAV/Locks/Backend/Abstract.php,
-         lib/Sabre/DAV/Locks/Backend/FS.php,
-         lib/Sabre/DAV/Locks/Backend/PDO.php,
-         lib/Sabre/DAV/Locks/LockInfo.php, lib/Sabre/DAV/Locks/Plugin.php,
-         lib/Sabre/DAV/Mount, lib/Sabre/DAV/Mount/Plugin.php,
-         lib/Sabre/DAV/Node.php, lib/Sabre/DAV/ObjectTree.php,
-         lib/Sabre/DAV/Property, lib/Sabre/DAV/Property.php,
-         lib/Sabre/DAV/Property/GetLastModified.php,
-         lib/Sabre/DAV/Property/Href.php,
-         lib/Sabre/DAV/Property/IHref.php,
-         lib/Sabre/DAV/Property/LockDiscovery.php,
-         lib/Sabre/DAV/Property/Principal.php,
-         lib/Sabre/DAV/Property/ResourceType.php,
-         lib/Sabre/DAV/Property/Response.php,
-         lib/Sabre/DAV/Property/SupportedLock.php,
-         lib/Sabre/DAV/Property/SupportedReportSet.php,
-         lib/Sabre/DAV/Server.php, lib/Sabre/DAV/ServerPlugin.php,
-         lib/Sabre/DAV/SimpleDirectory.php,
-         lib/Sabre/DAV/TemporaryFileFilterPlugin.php, lib/Sabre/DAV/Tree,
-         lib/Sabre/DAV/Tree.php, lib/Sabre/DAV/Tree/Filesystem.php,
-         lib/Sabre/DAV/URLUtil.php, lib/Sabre/DAV/Version.php,
-         lib/Sabre/DAV/XMLUtil.php, lib/Sabre/HTTP,
-         lib/Sabre/HTTP/AWSAuth.php, lib/Sabre/HTTP/AbstractAuth.php,
-         lib/Sabre/HTTP/BasicAuth.php, lib/Sabre/HTTP/DigestAuth.php,
-         lib/Sabre/HTTP/Request.php, lib/Sabre/HTTP/Response.php,
-         lib/Sabre/HTTP/Util.php, lib/Sabre/HTTP/Version.php,
-         lib/Sabre/autoload.php, locallang_db.xml: initial upload
-       * .: Share project "caldav" into
-         "http://svn.webempoweredchurch.org/repos/calendar"
-
diff --git a/Classes/Backend/Modul/IcsGeneratorModul.php b/Classes/Backend/Modul/IcsGeneratorModul.php
new file mode 100644 (file)
index 0000000..dbf546a
--- /dev/null
@@ -0,0 +1,205 @@
+<?php
+namespace TYPO3\CMS\Caldav\Backend\Modul;
+
+/**
+ * *************************************************************
+ * Copyright notice
+ *
+ * (c) 2010-2015 Mario Matzulla (mario(at)matzullas.de)
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ * *************************************************************
+ */
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+use TYPO3\CMS\Core\Messaging\FlashMessageService;
+
+/**
+ * Module 'Indexer' for the 'cal' extension.
+ *
+ * @author Mario Matzulla <mario(at)matzullas.de>
+ */
+class IcsGeneratorModul extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
+       var $pageinfo;
+       
+       /**
+        */
+       function init() {
+               global $BE_USER, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
+               
+               parent::init ();
+       }
+       
+       /**
+        * Adds items to the ->MOD_MENU array.
+        * Used for the function menu selector.
+        */
+       function menuConfig() {
+               $this->MOD_MENU = Array (
+                               'function' => Array (
+                                               '1' => $GLOBALS ['LANG']->getLL ( 'function1' ),
+                                               '2' => $GLOBALS ['LANG']->getLL ( 'function2' ),
+                                               '3' => $GLOBALS ['LANG']->getLL ( 'function3' ) 
+                               ) 
+               );
+               parent::menuConfig ();
+       }
+       
+       // If you chose 'web' as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
+       /**
+        * Main function of the module.
+        * Write the content to $this->content
+        */
+       function main() {
+               global $BE_USER, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
+               
+               // Access check!
+               // The page will show only if there is a valid page and if this page may be viewed by the user
+               $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess ( $this->id, $this->perms_clause );
+               $access = is_array ( $this->pageinfo ) ? 1 : 0;
+               
+               if (($this->id && $access) || ($BE_USER->user ['admin'] && ! $this->id)) {
+                       
+                       // Draw the header.
+                       $this->doc = GeneralUtility::makeInstance ( 'TYPO3\\CMS\\Backend\\Template\\DocumentTemplate' );
+                       $this->doc->backPath = $BACK_PATH;
+                       $this->doc->form = '<form action="" method="POST">';
+                       
+                       // JavaScript
+                       $this->doc->JScode = '
+                               <script language="javascript" type="text/javascript">
+                                       script_ended = 0;
+                                       function jumpToUrl(URL) {
+                                               document.location = URL;
+                                       }
+                               </script>
+                       ';
+                       $this->doc->postCode = '
+                               <script language="javascript" type="text/javascript">
+                                       script_ended = 1;
+                                       if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval ( $this->id ) . ';
+                               </script>
+                       ';
+                       
+                       $headerSection = $this->doc->getHeader ( 'pages', $this->pageinfo, $this->pageinfo ['_thePath'] ) . '<br>' . $GLOBALS ['LANG']->sL ( 'LLL:EXT:lang/locallang_core.php:labels.path' ) . ': ' . GeneralUtility::fixed_lgd_cs ( $this->pageinfo ['_thePath'], - 50 );
+                       
+                       $this->content .= $this->doc->startPage ( $GLOBALS ['LANG']->getLL ( 'title' ) );
+                       $this->content .= $this->doc->header ( $GLOBALS ['LANG']->getLL ( 'title' ) );
+                       $this->content .= $this->doc->spacer ( 5 );
+                       $this->content .= $this->doc->section ( '', $this->doc->funcMenu ( $headerSection, \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu ( $this->id, 'SET[function]', $this->MOD_SETTINGS ['function'], $this->MOD_MENU ['function'] ) ) );
+                       $this->content .= $this->doc->divider ( 5 );
+                       
+                       // Render content:
+                       $this->moduleContent ();
+                       
+                       // ShortCut
+                       if ($BE_USER->mayMakeShortcut ()) {
+                               $this->content .= $this->doc->spacer ( 20 ) . $this->doc->section ( '', $this->doc->makeShortcutIcon ( 'id', implode ( ',', array_keys ( $this->MOD_MENU ) ), $this->MCONF ['name'] ) );
+                       }
+                       
+                       $this->content .= $this->doc->spacer ( 10 );
+               } else {
+                       // If no access or if ID == zero
+                       
+                       $this->doc = GeneralUtility::makeInstance ( 'TYPO3\\CMS\\Backend\\Template\\DocumentTemplate' );
+                       $this->doc->backPath = $BACK_PATH;
+                       
+                       $this->content .= $this->doc->startPage ( $GLOBALS ['LANG']->getLL ( 'title' ) );
+                       $this->content .= $this->doc->header ( $GLOBALS ['LANG']->getLL ( 'title' ) );
+                       $this->content .= $this->doc->spacer ( 5 );
+                       $this->content .= $this->doc->spacer ( 10 );
+               }
+       }
+       
+       /**
+        * Prints out the module HTML
+        */
+       function printContent() {
+               $this->content .= $this->doc->endPage ();
+               echo $this->content;
+       }
+       
+       /**
+        * Generates the module content
+        */
+       function moduleContent() {
+               switch (intval ( $this->MOD_SETTINGS ['function'] )) {
+                       case 2 :
+                               $postVarArray = GeneralUtility::_POST ();
+                               $pageIds = Array ();
+                               foreach ( $postVarArray as $name => $value ) {
+                                       if ($name == 'pageId') {
+                                               $pageIds [intval ( $value )] = intval ( $value );
+                                       }
+                               }
+                               
+                               if (! empty ( $pageIds )) {
+                                       $content = $GLOBALS ['LANG']->getLL ( 'generateIcs' ) . '<br/>';
+                                       $rgc = new \TYPO3\CMS\Caldav\Service\IcsGenerator (0);
+                                       $this->content .= $this->doc->section ( $GLOBALS ['LANG']->getLL ( 'found' ), $rgc->countEventsWithoutIcs (), 0, 1 );
+                                       $this->content .= $GLOBALS ['LANG']->getLL ( 'toBeProcessed' );
+                                       foreach ( $pageIds as $eventPage => $pluginPage ) {
+                                               $rgc->pageIDForPlugin = $pluginPage;
+                                               $this->content .= $this->doc->section ( 'PID ' . $eventPage . $GLOBALS ['LANG']->getLL ( 'generateIcs' ), $rgc->generateIcs (), 0, 1 );
+                                       }
+                               } else {
+                                       $extConf = unserialize ( $GLOBALS ['TYPO3_CONF_VARS'] ['EXT'] ['extConf'] ['cal'] );
+                                       //$this->content .= '<script type="text/javascript">' . $this->getJScode () . '</script>';
+                                       
+                                       $pid = 0;
+                                       $selectFieldIds = Array ();
+                                       $content .= '<table><tbody>';
+                                       $content .= '<tr><td>';
+                                       $content .= '"' . $GLOBALS ['LANG']->getLL ( 'tableHeader2' ) . ' :';
+                                       $content .= '</td><td>';
+                                       // $content.='<select id="tceforms-multiselect-'.$pid.'" style="width:250px;" name="pageId'.$pid.'_list" class="formField tceforms-multiselect" size="1"></select>';
+                                       // $content.='<a href="#" onclick="setFormValueOpenBrowser(\'db\',\'pageId'.$pid.'|||pages|\'); return false;"><img src="sysext/t3skin/icons/gfx/insert3.gif" alt="'.$GLOBALS['LANG']->getLL('browse').'" title="'.$GLOBALS['LANG']->getLL('browse').'" border="0" height="15" width="15"></a>';
+                                       $content .= '<input type="text" value="" name="pageId">';
+                                       $content .= '</td></tr>';
+                                       $selectFieldIds [] = 'pageId' . $pid;
+                                       $content .= '<tbody></table>';
+                                       // $content.='<input name="pageId_list" id="pageId" type="text" value="" size="5" maxlength="5"><br />';
+                                       $scontent .= '<input type="submit" value="' . $GLOBALS ['LANG']->getLL ( 'submit' ) . '" onclick="return markSelections();"/>';
+                                       
+                                       $selectFields = '';
+                                       foreach ( $selectFieldIds as $selectFieldId ) {
+                                               $selectFields .= ' var o' . $selectFieldId . ' = document.getElementById("' . $selectFieldId . '");if(o' . $selectFieldId . '.options.length > 0){o' . $selectFieldId . '.options[0].selected = "selected";} else {notComplete = 1;}';
+                                       }
+                                       $content .= '<script type="text/javascript">function markSelections(){ var notComplete = 0;' . $selectFields . ' if(notComplete == 1){alert("' . $GLOBALS ['LANG']->getLL ( 'notAllPagesAssigned' ) . '");return false;}return true;}</script>';
+                                       
+                                       $this->content .= $this->doc->section ( $GLOBALS ['LANG']->getLL ( 'selectPage' ), $content, 0, 1 );
+                                       $this->content .= $this->doc->section ( $GLOBALS ['LANG']->getLL ( 'startIndexing' ), $scontent, 0, 1 );
+                               }
+                               break;
+                       case 3 :
+                               $rgc = new \TYPO3\CMS\Caldav\Service\IcsGenerator (0);
+                               $this->content .= $this->doc->section ( 'Check', $rgc->check (), 0, 1 );
+                               break;
+                       default :
+                               $this->content .= $this->doc->section ( $GLOBALS ['LANG']->getLL ( 'notice_header' ), $GLOBALS ['LANG']->getLL ( 'notice' ), 0, 1 );
+                               $this->content .= $this->doc->section ( $GLOBALS ['LANG']->getLL ( 'capabilities_header' ), $GLOBALS ['LANG']->getLL ( 'capabilities' ), 0, 1 );
+                               break;
+               }
+       }
+       private function getJScode() {
+               $forms = new \TYPO3\CMS\Backend\Form\FormEngine();
+               $forms->backPath = $GLOBALS['BACK_PATH'];
+       }
+}
+?>
\ No newline at end of file
diff --git a/Classes/Backend/Modul/clear.gif b/Classes/Backend/Modul/clear.gif
new file mode 100644 (file)
index 0000000..9ed1269
Binary files /dev/null and b/Classes/Backend/Modul/clear.gif differ
diff --git a/Classes/Backend/Modul/conf.php b/Classes/Backend/Modul/conf.php
new file mode 100644 (file)
index 0000000..31d1b08
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+       // DO NOT REMOVE OR CHANGE THESE 3 LINES:
+#define('TYPO3_MOD_PATH', '../typo3conf/ext/cal/mod1/');
+#$BACK_PATH='../../../../typo3/';
+$MCONF["name"]="tools_calicsgenerator";
+
+       
+$MCONF["access"]="admin";
+#$MCONF["script"]="index.php";
+$MCONF["script"]="_DISPATCH";
+
+$MLANG["default"]["tabs_images"]["tab"] = "moduleicon.gif";
+$MLANG ["default"] ["ll_ref"] = "LLL:EXT:caldav/Resources/Private/Language/locallang_ics_generator_mod.xml";
+?>
\ No newline at end of file
diff --git a/Classes/Backend/Modul/index.php b/Classes/Backend/Modul/index.php
new file mode 100644 (file)
index 0000000..629bfcf
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * *************************************************************
+ * Copyright notice
+ *
+ * (c) 2005 Mario Matzulla (mario(at)matzullas.de)
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ * *************************************************************
+ */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+
+/** 
+ * Module 'ics_generator' for the 'caldav' extension.
+ *
+ * @authorMario Matzulla <mario(at)matzullas.de>
+ */
+
+
+$GLOBALS ['LANG']->includeLLFile ('EXT:caldav/Resources/Private/Language/locallang_ics_generator.xml');
+$BE_USER->modAccess ($MCONF, 1); // This checks permissions and exits if the users has no permission for entry.
+// DEFAULT initialization of a module [END]
+
+// Make instance:
+$SOBE = new \TYPO3\CMS\Caldav\Backend\Modul\IcsGeneratorModul ();
+$SOBE->init ();
+
+$SOBE->main ();
+$SOBE->printContent ();
+?>
\ No newline at end of file
diff --git a/Classes/Backend/Modul/moduleicon.gif b/Classes/Backend/Modul/moduleicon.gif
new file mode 100644 (file)
index 0000000..8cd9b2c
Binary files /dev/null and b/Classes/Backend/Modul/moduleicon.gif differ
diff --git a/Classes/Hooks/TceMainProcessdatamap.php b/Classes/Hooks/TceMainProcessdatamap.php
new file mode 100644 (file)
index 0000000..15e6803
--- /dev/null
@@ -0,0 +1,109 @@
+<?php
+namespace TYPO3\CMS\Caldav\Hooks;
+/**
+ * *************************************************************
+ * Copyright notice
+ *
+ * (c) 2010-2015 Mario Matzulla (mario(at)matzullas.de)
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ * *************************************************************
+ */
+
+define ('ICALENDAR_PATH', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath ('cal') . 'Classes/Model/ICalendar.php');
+
+/**
+ * This hook extends the tcemain class.
+ * It catches changes on tx_cal_event
+ *
+ * @author     Mario Matzulla <mario(at)matzullas.de>
+ */
+class TceMainProcessdatamap {
+
+       
+       function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, &$tcemain) {
+               
+               /* If we have a new calendar event */
+               if (($table == 'tx_cal_event' || $table == 'tx_cal_exception_event') && count($fieldArray)>1) {
+                       $event = t3lib_BEfunc::getRecord ($table, $status=='new'?$tcemain->substNEWwithIDs[$id]:$id);
+                       
+                       /* If we're in a workspace, don't notify anyone about the event */
+                       if($event['pid'] > 0) {
+                               /* Check Page TSConfig for a preview page that we should use */
+                               $pageTSConf = t3lib_befunc::getPagesTSconfig($event['pid']);
+                               if($pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin']) {
+                                       $pageIDForPlugin = $pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin'];
+                               } else {
+                                       $pageIDForPlugin = $event['pid'];
+                               }
+                       
+                               $page = t3lib_BEfunc::getRecord('pages', intval($pageIDForPlugin), 'doktype');
+
+                               if($page['doktype'] != 254) {
+                                       $tx_cal_api = t3lib_div :: makeInstance('tx_cal_api');
+                                       $tx_cal_api = &$tx_cal_api->tx_cal_api_without($pageIDForPlugin);
+
+                                       if($table == 'tx_cal_event'){
+                                               $eventObject = $tx_cal_api->modelObj->findEvent($event['uid'], 'tx_cal_phpicalendar', $tx_cal_api->conf['pidList'], false, false, false, true, true);
+
+                                               if ($eventObject->conf['view.']['event.']['phpicalendarEventTemplate']) {
+                                                       $oldPath = &$eventObject->conf['view.']['event.']['phpicalendarEventTemplate'];
+                                               } else {
+                                                       $oldPath = &$eventObject->conf['view.']['event.']['eventModelTemplate'];
+                                               }
+                                               $oldView = $eventObject->conf['view'];
+                                               $eventObject->conf['view'] = 'single_ics';
+                                               $extPath=t3lib_extMgm::extPath('cal');
+                                               
+                                               $oldPath = 'EXT:cal/standard_template/event_model.tmpl';
+                                               $oldPath = str_replace('EXT:cal/', $extPath, $oldPath);
+                                               //$oldPath = str_replace(PATH_site, '', $oldPath);
+                                               $eventObject->conf['view.']['event.']['phpicalendarEventTemplate'] = $oldPath;
+                                               $eventObject->conf['view.']['event.']['eventModelTemplate'] = $oldPath;
+                                               $oldBackPath = $GLOBALS['TSFE']->tmpl->getFileName_backPath;
+                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = '';
+                                               $fileInfo = t3lib_div::split_fileref($oldPath);
+                                               $GLOBALS['TSFE']->tmpl->allowedPaths[] = $fileInfo['path'];
+                                               
+                                               $viewObj = &tx_cal_registry::Registry('basic','viewcontroller');
+                                               $masterArray = Array($eventObject);
+                                               $drawnIcs = $viewObj->drawIcs($masterArray, '', false);
+                                               $table = 'tx_cal_event';
+                                               $where = 'uid = '.$event['uid'];
+                                               $eventData = Array('tx_caldav_data'=>$drawnIcs);
+                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
+                                               
+                                               $table = 'tx_cal_calendar';
+                                               $where = 'uid = '.$event['calendar_id'];
+                                               $eventData = Array('tstamp'=>time());
+                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
+
+                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = $oldBackPath;
+                                               $eventObject->conf['view'] = $oldView;
+                                       }
+                               }
+                       }
+               } 
+       }
+}
+
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/hooks/class.tx_caldav_tcemain_processdatamap.php']) {
+       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/hooks/class.tx_caldav_tcemain_processdatamap.php']);
+}
+?>
\ No newline at end of file
diff --git a/Classes/Service/IcsGenerator.php b/Classes/Service/IcsGenerator.php
new file mode 100644 (file)
index 0000000..c68b37b
--- /dev/null
@@ -0,0 +1,169 @@
+<?php
+namespace TYPO3\CMS\Caldav\Service;
+
+/**
+ * *************************************************************
+ * Copyright notice
+ *
+ * (c) 2010-2015 Mario Matzulla (mario(at)matzullas.de)
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ * *************************************************************
+ */
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+class IcsGenerator {
+       var $info = '';
+       var $pageIDForPlugin;
+       var $extConf;
+       var $table = 'tx_cal_event,tx_cal_calendar';
+       var $where = 'tx_cal_event.calendar_id = tx_cal_calendar.uid and tx_cal_calendar.type = 0 and tx_cal_calendar.nearby = 0 and tx_cal_event.type in (0,1,2,3) and tx_cal_event.deleted = 0 and tx_cal_event.hidden = 0 and tx_cal_calendar.deleted = 0 and tx_cal_calendar.hidden = 0 and ((tx_cal_event.tx_caldav_data is null) or (tx_cal_event.tx_caldav_data like "%no event model template file found%" OR tx_cal_event.tx_caldav_data like "%no event model template file found:%"))';
+       function __construct($pageIDForPlugin) {
+               $this->extConf = unserialize ( $GLOBALS ['TYPO3_CONF_VARS'] ['EXT'] ['extConf'] ['cal'] );
+               $this->pageIDForPlugin = $pageIDForPlugin;
+       }
+       function getInfo() {
+               return $this->info;
+       }
+       function check() {
+               $select = 'tx_cal_event.*';
+               $table = $this->table;
+               $where = $this->where;
+               
+               $return = '';
+               
+               $results = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( $select, $table, $where );
+               if ($results) {
+                       while ( $row = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $results ) ) {
+                               $return .= '<p>[UID:' . $row ['uid'] . '; PID:' . $row ['pid'] . '] ' . $row ['title'] . ' -> ' . $row ['tx_caldav_data'] . '</p><br />';
+                       }
+                       $GLOBALS ['TYPO3_DB']->sql_free_result ( $results );
+               }
+               if ($return == '') {
+                       $return = 'no problems found';
+               }
+               return $return;
+       }
+       function countEventsWithoutIcs($eventPage = 0) {
+               $count = 0;
+               $select = 'count(*)';
+               $table = $this->table;
+               $where = $this->where;
+               if ($eventPage > 0) {
+                       $where = 'tx_cal_event.pid = ' . $eventPage . ' AND ' . $where;
+               }
+               $results = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( $select, $table, $where );
+               if ($results) {
+                       while ( $row = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $results ) ) {
+                               $count = $row ['count(*)'];
+                       }
+                       $GLOBALS ['TYPO3_DB']->sql_free_result ( $results );
+               }
+               
+               return $count;
+       }
+       function generateIcs($eventPage = 0) {
+               $select = 'tx_cal_event.*';
+               $table = $this->table;
+               $where = $this->where;
+               if ($eventPage > 0) {
+                       $where = 'tx_cal_event.pid = ' . $eventPage . ' AND ' . $where;
+               }
+               
+               $results = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( $select, $table, $where );
+               if ($results) {
+                       $eventArray = Array();
+                       while ( $event = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $results ) ) {
+                               $eventArray [] = $event;
+                       }
+                       $GLOBALS ['TYPO3_DB']->sql_free_result ( $results );
+                       
+                       $page = BackendUtility::getRecord ( 'pages', intval ( $this->pageIDForPlugin ), 'doktype' );
+                       if ($page ['doktype'] != 254) {
+                               $calAPI = new \TYPO3\CMS\Cal\Controller\Api ();
+                               $calAPI = &$calAPI->tx_cal_api_without ( $this->pageIDForPlugin );
+                               
+                               foreach ( $eventArray as $event ) {
+                                       
+                                       if ($event ['pid'] > 0) {
+                                               /* Check Page TSConfig for a preview page that we should use */
+                                               $eventObject = $calAPI->modelObj->findEvent ( $event ['uid'], 'tx_cal_phpicalendar', $event ['pid'], false, false, false, true, true );
+                                               if (is_object ( $eventObject )) {
+                                                       if ($eventObject->conf ['view.'] ['event.'] ['phpicalendarEventTemplate']) {
+                                                               $oldPath = &$eventObject->conf ['view.'] ['event.'] ['phpicalendarEventTemplate'];
+                                                       } else {
+                                                               $oldPath = &$eventObject->conf ['view.'] ['event.'] ['eventModelTemplate'];
+                                                       }
+                                                       
+                                                       $oldView = $eventObject->conf ['view'];
+                                                       $eventObject->conf ['view'] = 'single_ics';
+                                                       $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath ( 'cal' );
+                                                       
+                                                       $oldPath = 'EXT:cal/Resources/Private/Templates/v2/event_model.tmpl';
+                                                       $oldPath = str_replace ( 'EXT:cal/', $extPath, $oldPath );
+                                                       // $oldPath = str_replace(PATH_site, '', $oldPath);
+                                                       $eventObject->conf ['view.'] ['event.'] ['phpicalendarEventTemplate'] = $oldPath;
+                                                       $eventObject->conf ['view.'] ['event.'] ['eventModelTemplate'] = $oldPath;
+                                                       $oldBackPath = $GLOBALS ['TSFE']->tmpl->getFileName_backPath;
+                                                       $GLOBALS ['TSFE']->tmpl->getFileName_backPath = '';
+                                                       $fileInfo = GeneralUtility::split_fileref ( $oldPath );
+                                                       $GLOBALS ['TSFE']->tmpl->allowedPaths [] = $fileInfo ['path'];
+                                                       
+                                                       $viewObj = &\TYPO3\CMS\cal\Utility\Registry::Registry ( 'basic', 'viewcontroller' );
+                                                       
+                                                       $masterArray = Array (
+                                                                       $eventObject 
+                                                       );
+                                                       $drawnIcs = $viewObj->drawIcs ( $masterArray, '', false );
+                                                       
+                                                       $table = 'tx_cal_event';
+                                                       $where = 'uid = ' . $event ['uid'];
+                                                       $eventData = Array (
+                                                                       'tx_caldav_data' => $drawnIcs 
+                                                       );
+                                                       if ($event ['tx_caldav_uid'] == null || $event ['tx_caldav_uid'] == '') {
+                                                               
+                                                               $eventData ['tx_caldav_uid'] = $calAPI->conf ['view.'] ['ics.'] ['eventUidPrefix'] . '_' . $event ['calendar_id'] . '_' . $event ['uid'];
+                                                       }
+                                                       $result = $GLOBALS ['TYPO3_DB']->exec_UPDATEquery ( $table, $where, $eventData );
+                                                       
+                                                       $table = 'tx_cal_calendar';
+                                                       $where = 'tx_cal_calendar.uid = ' . $event ['calendar_id'];
+                                                       $eventData = Array (
+                                                                       'tstamp' => time () 
+                                                       );
+                                                       $result = $GLOBALS ['TYPO3_DB']->exec_UPDATEquery ( $table, $where, $eventData );
+                                                       
+                                                       $GLOBALS ['TSFE']->tmpl->getFileName_backPath = $oldBackPath;
+                                                       $eventObject->conf ['view'] = $oldView;
+                                               }
+                                       }
+                               }
+                       }
+               }
+               
+               $this->info = 'Done.';
+       }
+}
+
+if (defined ( 'TYPO3_MODE' ) && $TYPO3_CONF_VARS [TYPO3_MODE] ['XCLASS'] ['ext/caldav/mod1/class.tx_cal_ics_generator.php']) {
+       require_once ($TYPO3_CONF_VARS [TYPO3_MODE] ['XCLASS'] ['ext/caldav/mod1/class.tx_cal_ics_generator.php']);
+}
+
+?>
\ No newline at end of file
diff --git a/Documentation/Changelog/0-0-1.rst b/Documentation/Changelog/0-0-1.rst
new file mode 100644 (file)
index 0000000..32b5ec1
--- /dev/null
@@ -0,0 +1,127 @@
+
+0.0.1 - TYPO3 LTS 4.5
+--------------------------------
+
+::
+
+       * initial upload
+       
+       2011-05-03  jeff
+
+       * ext_icon.gif: Updated extension icon.
+       * ext_emconf.php: Raised state to beta.
+       * ChangeLog, LICENSE, lib/ChangeLog, lib/LICENSE: Moved external
+         license and changelog files into lib directory.
+
+       2011-02-10  mario
+
+       * doc/manual.sxw, ext_conf_template.txt: updated pid configuration
+
+       2010-11-16  mario
+
+       * doc/manual.sxw: updated manual
+
+       2010-11-13  mario
+
+       * ext_emconf.php: added dependency version for cal
+       * ext_emconf.php: updated version and md5 values
+       * ext_tables.sql: fixed sql
+       * doc, doc/manual.sxw: added docu
+
+       2010-11-10  mario
+
+       * ext_conf_template.txt, lib/Sabre/DAV/Auth/Backend/TYPO3.php:
+         switched from digest to basic auth -> using TYPO3 auth
+
+       2010-11-01  mario
+
+       * .buildpath, .project, ChangeLog, LICENSE, _htaccess, caldav.php,
+         ext_autoload.php, ext_emconf.php, ext_icon.gif,
+         ext_localconf.php, ext_tables.php, ext_tables.sql, hooks,
+         hooks/class.tx_caldav_tcemain_processdatamap.php, lib, lib/Sabre,
+         lib/Sabre.autoload.php, lib/Sabre.includes.php, lib/Sabre/CalDAV,
+         lib/Sabre/CalDAV/Backend, lib/Sabre/CalDAV/Backend/Abstract.php,
+         lib/Sabre/CalDAV/Backend/PDO.php,
+         lib/Sabre/CalDAV/Backend/TYPO3.php,
+         lib/Sabre/CalDAV/Calendar.php,
+         lib/Sabre/CalDAV/CalendarObject.php,
+         lib/Sabre/CalDAV/CalendarRootNode.php,
+         lib/Sabre/CalDAV/Exception,
+         lib/Sabre/CalDAV/Exception/InvalidICalendarObject.php,
+         lib/Sabre/CalDAV/ICalendarUtil.php, lib/Sabre/CalDAV/Plugin.php,
+         lib/Sabre/CalDAV/Property,
+         lib/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php,
+         lib/Sabre/CalDAV/Property/SupportedCalendarData.php,
+         lib/Sabre/CalDAV/Property/SupportedCollationSet.php,
+         lib/Sabre/CalDAV/Server.php, lib/Sabre/CalDAV/TYPO3Server.php,
+         lib/Sabre/CalDAV/UserCalendars.php, lib/Sabre/CalDAV/Version.php,
+         lib/Sabre/CalDAV/XMLUtil.php, lib/Sabre/DAV, lib/Sabre/DAV/Auth,
+         lib/Sabre/DAV/Auth/Backend,
+         lib/Sabre/DAV/Auth/Backend/Abstract.php,
+         lib/Sabre/DAV/Auth/Backend/AbstractBasic.php,
+         lib/Sabre/DAV/Auth/Backend/AbstractDigest.php,
+         lib/Sabre/DAV/Auth/Backend/Apache.php,
+         lib/Sabre/DAV/Auth/Backend/File.php,
+         lib/Sabre/DAV/Auth/Backend/PDO.php,
+         lib/Sabre/DAV/Auth/Backend/TYPO3.php,
+         lib/Sabre/DAV/Auth/Plugin.php, lib/Sabre/DAV/Auth/Principal.php,
+         lib/Sabre/DAV/Auth/PrincipalCollection.php,
+         lib/Sabre/DAV/Browser,
+         lib/Sabre/DAV/Browser/GuessContentType.php,
+         lib/Sabre/DAV/Browser/MapGetToPropFind.php,
+         lib/Sabre/DAV/Browser/Plugin.php, lib/Sabre/DAV/Directory.php,
+         lib/Sabre/DAV/Exception, lib/Sabre/DAV/Exception.php,
+         lib/Sabre/DAV/Exception/BadRequest.php,
+         lib/Sabre/DAV/Exception/Conflict.php,
+         lib/Sabre/DAV/Exception/ConflictingLock.php,
+         lib/Sabre/DAV/Exception/FileNotFound.php,
+         lib/Sabre/DAV/Exception/Forbidden.php,
+         lib/Sabre/DAV/Exception/InsufficientStorage.php,
+         lib/Sabre/DAV/Exception/InvalidResourceType.php,
+         lib/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php,
+         lib/Sabre/DAV/Exception/Locked.php,
+         lib/Sabre/DAV/Exception/MethodNotAllowed.php,
+         lib/Sabre/DAV/Exception/NotAuthenticated.php,
+         lib/Sabre/DAV/Exception/NotImplemented.php,
+         lib/Sabre/DAV/Exception/PreconditionFailed.php,
+         lib/Sabre/DAV/Exception/ReportNotImplemented.php,
+         lib/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php,
+         lib/Sabre/DAV/Exception/UnsupportedMediaType.php,
+         lib/Sabre/DAV/FS, lib/Sabre/DAV/FS/Directory.php,
+         lib/Sabre/DAV/FS/File.php, lib/Sabre/DAV/FS/Node.php,
+         lib/Sabre/DAV/FSExt, lib/Sabre/DAV/FSExt/Directory.php,
+         lib/Sabre/DAV/FSExt/File.php, lib/Sabre/DAV/FSExt/Node.php,
+         lib/Sabre/DAV/File.php, lib/Sabre/DAV/ICollection.php,
+         lib/Sabre/DAV/IExtendedCollection.php, lib/Sabre/DAV/IFile.php,
+         lib/Sabre/DAV/ILockable.php, lib/Sabre/DAV/INode.php,
+         lib/Sabre/DAV/IProperties.php, lib/Sabre/DAV/IQuota.php,
+         lib/Sabre/DAV/Locks, lib/Sabre/DAV/Locks/Backend,
+         lib/Sabre/DAV/Locks/Backend/Abstract.php,
+         lib/Sabre/DAV/Locks/Backend/FS.php,
+         lib/Sabre/DAV/Locks/Backend/PDO.php,
+         lib/Sabre/DAV/Locks/LockInfo.php, lib/Sabre/DAV/Locks/Plugin.php,
+         lib/Sabre/DAV/Mount, lib/Sabre/DAV/Mount/Plugin.php,
+         lib/Sabre/DAV/Node.php, lib/Sabre/DAV/ObjectTree.php,
+         lib/Sabre/DAV/Property, lib/Sabre/DAV/Property.php,
+         lib/Sabre/DAV/Property/GetLastModified.php,
+         lib/Sabre/DAV/Property/Href.php,
+         lib/Sabre/DAV/Property/IHref.php,
+         lib/Sabre/DAV/Property/LockDiscovery.php,
+         lib/Sabre/DAV/Property/Principal.php,
+         lib/Sabre/DAV/Property/ResourceType.php,
+         lib/Sabre/DAV/Property/Response.php,
+         lib/Sabre/DAV/Property/SupportedLock.php,
+         lib/Sabre/DAV/Property/SupportedReportSet.php,
+         lib/Sabre/DAV/Server.php, lib/Sabre/DAV/ServerPlugin.php,
+         lib/Sabre/DAV/SimpleDirectory.php,
+         lib/Sabre/DAV/TemporaryFileFilterPlugin.php, lib/Sabre/DAV/Tree,
+         lib/Sabre/DAV/Tree.php, lib/Sabre/DAV/Tree/Filesystem.php,
+         lib/Sabre/DAV/URLUtil.php, lib/Sabre/DAV/Version.php,
+         lib/Sabre/DAV/XMLUtil.php, lib/Sabre/HTTP,
+         lib/Sabre/HTTP/AWSAuth.php, lib/Sabre/HTTP/AbstractAuth.php,
+         lib/Sabre/HTTP/BasicAuth.php, lib/Sabre/HTTP/DigestAuth.php,
+         lib/Sabre/HTTP/Request.php, lib/Sabre/HTTP/Response.php,
+         lib/Sabre/HTTP/Util.php, lib/Sabre/HTTP/Version.php,
+         lib/Sabre/autoload.php, locallang_db.xml: initial upload
+       * .: Share project "caldav" into
+         "http://svn.webempoweredchurch.org/repos/calendar"
diff --git a/Documentation/Changelog/1-0-0.rst b/Documentation/Changelog/1-0-0.rst
new file mode 100644 (file)
index 0000000..a1344bc
--- /dev/null
@@ -0,0 +1,9 @@
+
+1.0.0 - TYPO3 LTS 6.2 & TYPO3 7
+--------------------------------
+
+::
+
+       * Bug #65489  - TYPO3 6.2 compatibility
+       * Feature     - Documentation converted to sphinx
+
diff --git a/Documentation/Changelog/Index.rst b/Documentation/Changelog/Index.rst
new file mode 100644 (file)
index 0000000..95a0c4d
--- /dev/null
@@ -0,0 +1,24 @@
+.. _ChangeLog:
+
+=============
+ChangeLog
+=============
+
+.. include:: ../Includes.txt
+
+The following is a high level overview of the changes in CalDAV. For more details, have a look at the ticket itself at forge
+`(http://forge.typo3.org/projects/extension-caldav)
+<http://forge.typo3.org/projects/extension-caldav>`_.
+
+List of versions
+===================
+
+.. toctree::
+   :maxdepth: 5
+   :titlesonly:
+   :glob:
+
+   1-0-0
+   0-0-1
+
+
diff --git a/Documentation/Images/extension_option.png b/Documentation/Images/extension_option.png
new file mode 100644 (file)
index 0000000..c01738a
Binary files /dev/null and b/Documentation/Images/extension_option.png differ
diff --git a/Documentation/Images/frontend_user_calendar.png b/Documentation/Images/frontend_user_calendar.png
new file mode 100644 (file)
index 0000000..6801e74
Binary files /dev/null and b/Documentation/Images/frontend_user_calendar.png differ
diff --git a/Documentation/Images/info.png b/Documentation/Images/info.png
new file mode 100644 (file)
index 0000000..9a27525
Binary files /dev/null and b/Documentation/Images/info.png differ
diff --git a/Documentation/Images/link.jpg b/Documentation/Images/link.jpg
new file mode 100644 (file)
index 0000000..f4718cb
Binary files /dev/null and b/Documentation/Images/link.jpg differ
diff --git a/Documentation/Images/note.png b/Documentation/Images/note.png
new file mode 100644 (file)
index 0000000..6d36238
Binary files /dev/null and b/Documentation/Images/note.png differ
diff --git a/Documentation/Images/rtfm.png b/Documentation/Images/rtfm.png
new file mode 100644 (file)
index 0000000..2dc0f47
Binary files /dev/null and b/Documentation/Images/rtfm.png differ
diff --git a/Documentation/Images/warn.png b/Documentation/Images/warn.png
new file mode 100644 (file)
index 0000000..9ea96c3
Binary files /dev/null and b/Documentation/Images/warn.png differ
diff --git a/Documentation/Includes.txt b/Documentation/Includes.txt
new file mode 100644 (file)
index 0000000..fb63b49
--- /dev/null
@@ -0,0 +1,15 @@
+
+.. ==================================================
+.. FOR YOUR INFORMATION
+.. --------------------------------------------------
+.. -*- coding: utf-8 -*- with BOM.
+
+.. ==================================================
+.. DEFINE SOME TEXTROLES
+.. --------------------------------------------------
+.. role::   underline
+.. role::   typoscript(code)
+.. role::   ts(typoscript)
+   :class:  typoscript
+.. role::   php(code)
+
diff --git a/Documentation/Index.rst b/Documentation/Index.rst
new file mode 100644 (file)
index 0000000..d6408ac
--- /dev/null
@@ -0,0 +1,48 @@
+.. _CalDAV:
+
+==================
+CalDAV: CalDAV
+==================
+
+.. include:: Includes.txt
+
+:Classification:
+      caldav
+
+:Version:
+      |release|
+
+:Language:
+      en
+
+:Keywords:
+      forEditors, forAdmins, forDevelopers, forIntermediates, forAdvanced, cal, dav, caldav
+
+:Copyright:
+      2012-2015
+
+:Author:
+      Mario Matzulla
+
+:Email:
+      mario@matzullas.de
+
+:License:
+      This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml
+
+The content of this document is related to TYPO3, a GNU/GPL CMS/Framework available from `www.typo3.org <http://www.typo3.org/>`_.
+
+
+**Table of Contents**
+
+.. toctree::
+   :maxdepth: 5
+   :titlesonly:
+   :glob:
+
+   Introduction/Index
+   Overview/Index
+   Installation/Index
+   Usage/Index
+   Changelog/Index
+
diff --git a/Documentation/Installation/Index.rst b/Documentation/Installation/Index.rst
new file mode 100644 (file)
index 0000000..934ae7d
--- /dev/null
@@ -0,0 +1,23 @@
+.. _Installation:
+
+=============
+Installation
+=============
+
+.. include:: ../Includes.txt
+
+There are four steps necessary to install all the components of the
+CalDAV extension. If you've installed other extensions in the
+past, you will run into little new here.
+
+
+.. toctree::
+   :maxdepth: 5
+   :titlesonly:
+   :glob:
+
+
+   Step1InstallExtension/Index
+   Step2ConfigurePrivateCalendar/Index
+   Step3Htaccess/Index
+
diff --git a/Documentation/Installation/Step1InstallExtension/Images.txt b/Documentation/Installation/Step1InstallExtension/Images.txt
new file mode 100644 (file)
index 0000000..0cdcc1b
--- /dev/null
@@ -0,0 +1,7 @@
+.. |img-4|      image:: ../../Images/extension_option.png
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Extension Option
+
+
diff --git a/Documentation/Installation/Step1InstallExtension/Index.rst b/Documentation/Installation/Step1InstallExtension/Index.rst
new file mode 100644 (file)
index 0000000..85bed87
--- /dev/null
@@ -0,0 +1,19 @@
+.. include:: Images.txt
+.. _Step1InstallExtension:
+
+==============================
+Step 1: Install the Extension
+==============================
+
+.. include:: ../../Includes.txt
+
+
+In order to use this extension you need to have the Calendar Base (cal) extension installed and running.
+The typoscript template needs to have the static ics template included and configured.
+
+The CalDAV extension can be installed through the typical TYPO3 installation process using the Extension Manager.
+
+Define the pid's containing your frontend user and the calendar record in the extension options:
+
+|img-4| Extension manager: caldav options
+
diff --git a/Documentation/Installation/Step2ConfigurePrivateCalendar/Images.txt b/Documentation/Installation/Step2ConfigurePrivateCalendar/Images.txt
new file mode 100644 (file)
index 0000000..b71cee0
--- /dev/null
@@ -0,0 +1,7 @@
+.. |img-4|      image:: ../../Images/frontend_user_calendar.png
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Frontend User Calendar
+
+
diff --git a/Documentation/Installation/Step2ConfigurePrivateCalendar/Index.rst b/Documentation/Installation/Step2ConfigurePrivateCalendar/Index.rst
new file mode 100644 (file)
index 0000000..0607ae3
--- /dev/null
@@ -0,0 +1,13 @@
+.. include:: Images.txt
+.. _Step2ConfigurePrivateCalendar:
+
+============================================================
+Step 2: Configure the frontend users private calendar
+============================================================
+
+.. include:: ../../Includes.txt
+
+You need to have a frontend user and a calendar assigned to him/her:
+
+|img-4| Screenshot: FE-User mario, Tab: Extended
+
diff --git a/Documentation/Installation/Step3Htaccess/Index.rst b/Documentation/Installation/Step3Htaccess/Index.rst
new file mode 100644 (file)
index 0000000..c22a79d
--- /dev/null
@@ -0,0 +1,19 @@
+.. _Step3Htaccess:
+
+==============================
+Step 3: Htaccess
+==============================
+
+.. include:: ../../Includes.txt
+
+
+Depending on your webserver, you need to activate a htaccess file in the extension root, to add a rewrite rule for authentication:
+
+.. code-block:: html
+
+       <IfModule mod_rewrite.c>
+               RewriteEngine on
+               RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+       </IfModule>
+
+But first try if you can access without the _htaccess renamed to .htaccess.
diff --git a/Documentation/Introduction/AWelcome/Index.rst b/Documentation/Introduction/AWelcome/Index.rst
new file mode 100644 (file)
index 0000000..16b0097
--- /dev/null
@@ -0,0 +1,11 @@
+.. _AWelcome:
+
+=============
+A. Welcome
+=============
+
+.. include:: ../../Includes.txt
+
+The extension extends the Calendar Base (cal) extension with CalDAV functionality. So you can connect your iphone, sunbird or what ever CalDAV client to TYPO3 calendar.
+
+
diff --git a/Documentation/Introduction/BAboutThisManual/Index.rst b/Documentation/Introduction/BAboutThisManual/Index.rst
new file mode 100644 (file)
index 0000000..63e157d
--- /dev/null
@@ -0,0 +1,21 @@
+.. _BAboutThisManual:
+
+=====================
+B. About this Manual
+=====================
+
+.. include:: ../../Includes.txt
+
+This guide is organized into five main sections:
+
+#. **Overview:** What the CalDAV extension does, how it works, and what you can expect from the rest of the manual.
+
+#. **Installation:** How to install the CalDAV extension and how to get it running on your website.
+
+#. **Configuration:** How to configure the CalDAV extension and plugins for maximum impact on your website.
+
+#. **Additional Options:** Optional extensions that can enhance the CalDAV extension's usability.
+
+#. **Advanced:** How to modify the extension through TypoScript and other advanced functions.
+
+
diff --git a/Documentation/Introduction/CHowToUseThisManual/Images.txt b/Documentation/Introduction/CHowToUseThisManual/Images.txt
new file mode 100644 (file)
index 0000000..f49bca8
--- /dev/null
@@ -0,0 +1,40 @@
+.. |img-3|      image:: ../../Images/info.png
+   :height: 14
+   :width: 16
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: graphics62
+
+.. |img-4|      image:: ../../Images/note.png
+   :height: 15
+   :width: 15
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Note
+
+.. |img-5|      image:: ../../Images/warn.png
+   :height: 16
+   :width: 16
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Caution
+
+.. |img-6|      image:: ../../Images/rtfm.png
+   :height: 15
+   :width: 18
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Technical Stuff
+
+.. |img-7|      image:: ../../Images/link.jpg
+   :height: 15
+   :width: 18
+.. :align: left
+.. :border: 0
+.. :hspace: 12
+.. :name: Internet Link
+
diff --git a/Documentation/Introduction/CHowToUseThisManual/Index.rst b/Documentation/Introduction/CHowToUseThisManual/Index.rst
new file mode 100644 (file)
index 0000000..7f5aa56
--- /dev/null
@@ -0,0 +1,22 @@
+.. include:: Images.txt
+.. _CHowToUseThisManual:
+
+==========================
+C. How to Use this Manual
+==========================
+
+.. include:: ../../Includes.txt
+
+To help make sense of the material on the following pages, we’ve used a few icons in the margin to highlight certain information.
+
+|img-3| **Tip** : Tips are bits of information that are good to know. They may offer shortcuts to save you time or even make your website better.
+
+|img-4| **Note** : These notes are similar to tips, but usually contain information you should pay attention to. It might be details about a step that a whole operation hinges on or it may highlight an essential sequence of tasks.
+
+|img-5| **Caution** : These notes draw your attention to things that can interrupt your service or website if not done correctly. Some actions can be difficult to undo.
+
+|img-6| **Technical Stuff** : These notes will explain how stuff works. If you want to know why certain steps are necessary or are just looking for a fuller explanation, these notes should help answer your questions.
+
+|img-7| **Internet Link** : These links will guide you to a website page that will demonstrate How-To do something or link you to more advanced information on the  `http://typo3-calendar.org <http://typo3-calendar.org/>`_ or  `http://typo3.org <http://typo3.org/>`_ websites.
+
+
diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst
new file mode 100644 (file)
index 0000000..acab317
--- /dev/null
@@ -0,0 +1,17 @@
+.. _Introduction:
+
+=============
+Introduction
+=============
+
+.. include:: ../Includes.txt
+
+.. toctree::
+   :maxdepth: 5
+   :titlesonly:
+   :glob:
+
+   AWelcome/Index
+   BAboutThisManual/Index
+   CHowToUseThisManual/Index
+
diff --git a/Documentation/Overview/HowToGetHelp/Index.rst b/Documentation/Overview/HowToGetHelp/Index.rst
new file mode 100644 (file)
index 0000000..ad9c2e1
--- /dev/null
@@ -0,0 +1,15 @@
+.. _HowToGetHelp:
+
+================
+How to Get Help
+================
+
+.. include:: ../../Includes.txt
+
+The TYPO3 Calendar Project newsgroup at news://lists.typo3.org/typo3.projects.calendar is the best place to get support for any CalDAV questions. Post your questions and another user or someone from the development team will probably be able to help you out.
+
+Apart from the newsgroup, please visit our project page at forge `(http://forge.typo3.org/projects/extension-caldav)
+<http://forge.typo3.org/projects/extension-caldav>`_ and use the search function there. If you think you found a bug in an official release, need a new feature (or want to sponsor one) this is the best place to give it visibility.
+
+In any case, please provide some basic information of your installation: Which Typo3 version do you use and which caldav version.
+
diff --git a/Documentation/Overview/Index.rst b/Documentation/Overview/Index.rst
new file mode 100644 (file)
index 0000000..847d352
--- /dev/null
@@ -0,0 +1,16 @@
+.. _Overview:
+
+=============
+Overview
+=============
+
+.. include:: ../Includes.txt
+
+.. toctree::
+   :maxdepth: 5
+   :titlesonly:
+   :glob:
+
+   WhatDoesItDo/Index
+   HowToGetHelp/Index
+
diff --git a/Documentation/Overview/WhatDoesItDo/Index.rst b/Documentation/Overview/WhatDoesItDo/Index.rst
new file mode 100644 (file)
index 0000000..05f8fd8
--- /dev/null
@@ -0,0 +1,11 @@
+.. _WhatDoesItDo:
+
+=================
+What does it do?
+=================
+
+.. include:: ../../Includes.txt
+
+The CalDAV extension provides DAV functionality for the Calendar Base (cal) extension.
+
+
diff --git a/Documentation/Settings.yml b/Documentation/Settings.yml
new file mode 100644 (file)
index 0000000..d73b789
--- /dev/null
@@ -0,0 +1,15 @@
+conf.py:
+  copyright: 2010-2015
+  project: CalDAV
+  version: 1.1
+  release: 1.1.0
+  latex_documents:
+  - - Index
+    - caldav.tex
+    - CalDAV
+    - Mario Matzulla
+    - manual
+  latex_elements:
+    papersize: a4paper
+    pointsize: 10pt
+    preamble: \usepackage{typo3}
\ No newline at end of file
diff --git a/Documentation/Usage/Index.rst b/Documentation/Usage/Index.rst
new file mode 100644 (file)
index 0000000..02d3b9b
--- /dev/null
@@ -0,0 +1,23 @@
+.. _Usage:
+
+=================
+Usage
+=================
+
+.. include:: ../Includes.txt
+
+Now try and check if you can access the webinterface:
+
+www.your-domain.com/typo3conf/ext/caldav/caldav.php/
+
+You should see: “Index for /” and two links to select: “principals” and “calendars”.
+Now try to connect your CalDAV client to your TYPO3 calendar. The URL should look like this:
+For mozilla thunderbird extension sunbird or lightning:
+
+www.your-domain.com/typo3conf/ext/caldav/caldav.php/calendars/{username}/{calendar title}/
+
+For your iphone:
+
+www.your-domain.com/typo3conf/ext/caldav/caldav.php/principals/{username}/
+
+
diff --git a/Resources/Private/Language/locallang_db.xml b/Resources/Private/Language/locallang_db.xml
new file mode 100644 (file)
index 0000000..a05009f
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <type>database</type>
+               <description>Language labels for database tables/fields belonging to extension 'caldav'</description>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="caldav_data">CalDAV data</label>
+               </languageKey>
+       </data>
+</T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_ics_generator.xml b/Resources/Private/Language/locallang_ics_generator.xml
new file mode 100644 (file)
index 0000000..b92b625
--- /dev/null
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+    <meta type="array">
+        <description></description>
+        <type>module</type>
+        <csh_table></csh_table>
+        <labelContext type="array">
+        </labelContext>
+    </meta>
+    <data type="array">
+        <languageKey index="default" type="array">
+            <label index="title">Index generator for calendar base recurring events</label>
+            <label index="function1">Information</label>
+            <label index="function2">Generate</label>
+            <label index="function3">Check</label>
+            <label index="notice_header">Welcome</label>
+            <label index="notice">&lt;div align=center&gt;&lt;strong&gt;Notice header&lt;/strong&gt;&lt;/div&gt;&lt;BR&gt;Before you proceed, please read carefully:</label>
+            <label index="capabilities_header">Capabilities of this tool</label>
+            <label index="capabilities">This tool will create an index for all recurring tx_cal_event and tx_cal_exception_event instances.</label>
+            <label index="tableHeader1">Page/Folder containing events/exception events</label>
+            <label index="tableHeader2">Frontend Page with calendar plugin</label>
+            <label index="browse">Browse for records</label>
+            <label index="submit">Submit</label>
+            <label index="selectPage">Select the page where the typoscript of calendar base can be found. This should be a normal frontend page.</label>
+            <label index="indexStart">Enter the start time the index should start generating (YYYYMMDD)</label>
+            <label index="indexEnd">Enter the index ending time (YYYYMMDD)</label>
+            <label index="startIndexing">Click on submit to start indexing</label>
+            <label index="notAllPagesAssigned">You need to assign a frontend page to all found storage places in order to start indexing!</label>
+            <label index="result">Result: </label>
+            <label index="toBeIndexed"> -&gt; Events to be indexed: </label>
+            <label index="found">Found </label>
+            <label index="toBeProcessed"> to be processed.</label>
+            <label index="generateIcs">Generating ICS contents</label>
+        </languageKey>
+        <languageKey index="dk" type="array">
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+        <languageKey index="no" type="array">
+        </languageKey>
+        <languageKey index="it" type="array">
+        </languageKey>
+        <languageKey index="fr" type="array">
+        </languageKey>
+        <languageKey index="es" type="array">
+        </languageKey>
+        <languageKey index="nl" type="array">
+        </languageKey>
+        <languageKey index="cz" type="array">
+        </languageKey>
+        <languageKey index="pl" type="array">
+        </languageKey>
+        <languageKey index="si" type="array">
+        </languageKey>
+        <languageKey index="fi" type="array">
+        </languageKey>
+        <languageKey index="tr" type="array">
+        </languageKey>
+        <languageKey index="se" type="array">
+        </languageKey>
+        <languageKey index="pt" type="array">
+        </languageKey>
+        <languageKey index="ru" type="array">
+        </languageKey>
+        <languageKey index="ro" type="array">
+        </languageKey>
+        <languageKey index="ch" type="array">
+        </languageKey>
+        <languageKey index="sk" type="array">
+        </languageKey>
+        <languageKey index="lt" type="array">
+        </languageKey>
+        <languageKey index="is" type="array">
+        </languageKey>
+        <languageKey index="hr" type="array">
+        </languageKey>
+        <languageKey index="hu" type="array">
+        </languageKey>
+        <languageKey index="gl" type="array">
+        </languageKey>
+        <languageKey index="th" type="array">
+        </languageKey>
+        <languageKey index="gr" type="array">
+        </languageKey>
+        <languageKey index="hk" type="array">
+        </languageKey>
+        <languageKey index="eu" type="array">
+        </languageKey>
+        <languageKey index="bg" type="array">
+        </languageKey>
+        <languageKey index="br" type="array">
+        </languageKey>
+        <languageKey index="et" type="array">
+        </languageKey>
+        <languageKey index="ar" type="array">
+        </languageKey>
+        <languageKey index="he" type="array">
+        </languageKey>
+        <languageKey index="ua" type="array">
+        </languageKey>
+        <languageKey index="lv" type="array">
+        </languageKey>
+        <languageKey index="jp" type="array">
+        </languageKey>
+        <languageKey index="vn" type="array">
+        </languageKey>
+        <languageKey index="ca" type="array">
+        </languageKey>
+        <languageKey index="ba" type="array">
+        </languageKey>
+        <languageKey index="kr" type="array">
+        </languageKey>
+    </data>
+    <orig_hash type="array">
+        <languageKey index="default" type="array">
+            <label index="title" type="integer">160190671</label>
+            <label index="function1" type="integer">176340495</label>
+            <label index="function2" type="integer">53186973</label>
+            <label index="notice_header" type="integer">137500844</label>
+            <label index="notice" type="integer">244197590</label>
+            <label index="capabilities_header" type="integer">235312747</label>
+            <label index="capabilities" type="integer">265998735</label>
+            <label index="tableHeader1" type="integer">124841659</label>
+            <label index="tableHeader2" type="integer">250451894</label>
+            <label index="browse" type="integer">3203407</label>
+            <label index="submit" type="integer">172833558</label>
+            <label index="selectPage" type="integer">13186099</label>
+            <label index="indexStart" type="integer">92521741</label>
+            <label index="indexEnd" type="integer">132549580</label>
+            <label index="startIndexing" type="integer">182684290</label>
+            <label index="notAllPagesAssigned" type="integer">252237131</label>
+            <label index="result" type="integer">257132644</label>
+            <label index="toBeIndexed" type="integer">44755805</label>
+            <label index="droppingTable" type="integer">114304630</label>
+            <label index="indexing" type="integer">86103277</label>
+        </languageKey>
+        <languageKey index="dk" type="array">
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+        <languageKey index="no" type="array">
+        </languageKey>
+        <languageKey index="it" type="array">
+        </languageKey>
+        <languageKey index="fr" type="array">
+        </languageKey>
+        <languageKey index="es" type="array">
+        </languageKey>
+        <languageKey index="nl" type="array">
+        </languageKey>
+        <languageKey index="cz" type="array">
+        </languageKey>
+        <languageKey index="pl" type="array">
+        </languageKey>
+        <languageKey index="si" type="array">
+        </languageKey>
+        <languageKey index="fi" type="array">
+        </languageKey>
+        <languageKey index="tr" type="array">
+        </languageKey>
+        <languageKey index="se" type="array">
+        </languageKey>
+        <languageKey index="pt" type="array">
+        </languageKey>
+        <languageKey index="ru" type="array">
+        </languageKey>
+        <languageKey index="ro" type="array">
+        </languageKey>
+        <languageKey index="ch" type="array">
+        </languageKey>
+        <languageKey index="sk" type="array">
+        </languageKey>
+        <languageKey index="lt" type="array">
+        </languageKey>
+        <languageKey index="is" type="array">
+        </languageKey>
+        <languageKey index="hr" type="array">
+        </languageKey>
+        <languageKey index="hu" type="array">
+        </languageKey>
+        <languageKey index="gl" type="array">
+        </languageKey>
+        <languageKey index="th" type="array">
+        </languageKey>
+        <languageKey index="gr" type="array">
+        </languageKey>
+        <languageKey index="hk" type="array">
+        </languageKey>
+        <languageKey index="eu" type="array">
+        </languageKey>
+        <languageKey index="bg" type="array">
+        </languageKey>
+        <languageKey index="br" type="array">
+        </languageKey>
+        <languageKey index="et" type="array">
+        </languageKey>
+        <languageKey index="ar" type="array">
+        </languageKey>
+        <languageKey index="he" type="array">
+        </languageKey>
+        <languageKey index="ua" type="array">
+        </languageKey>
+        <languageKey index="lv" type="array">
+        </languageKey>
+        <languageKey index="jp" type="array">
+        </languageKey>
+        <languageKey index="vn" type="array">
+        </languageKey>
+        <languageKey index="ca" type="array">
+        </languageKey>
+        <languageKey index="ba" type="array">
+        </languageKey>
+        <languageKey index="kr" type="array">
+        </languageKey>
+    </orig_hash>
+    <orig_text type="array">
+        <languageKey index="default" type="array">
+        </languageKey>
+        <languageKey index="dk" type="array">
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+        <languageKey index="no" type="array">
+        </languageKey>
+        <languageKey index="it" type="array">
+        </languageKey>
+        <languageKey index="fr" type="array">
+        </languageKey>
+        <languageKey index="es" type="array">
+        </languageKey>
+        <languageKey index="nl" type="array">
+        </languageKey>
+        <languageKey index="cz" type="array">
+        </languageKey>
+        <languageKey index="pl" type="array">
+        </languageKey>
+        <languageKey index="si" type="array">
+        </languageKey>
+        <languageKey index="fi" type="array">
+        </languageKey>
+        <languageKey index="tr" type="array">
+        </languageKey>
+        <languageKey index="se" type="array">
+        </languageKey>
+        <languageKey index="pt" type="array">
+        </languageKey>
+        <languageKey index="ru" type="array">
+        </languageKey>
+        <languageKey index="ro" type="array">
+        </languageKey>
+        <languageKey index="ch" type="array">
+        </languageKey>
+        <languageKey index="sk" type="array">
+        </languageKey>
+        <languageKey index="lt" type="array">
+        </languageKey>
+        <languageKey index="is" type="array">
+        </languageKey>
+        <languageKey index="hr" type="array">
+        </languageKey>
+        <languageKey index="hu" type="array">
+        </languageKey>
+        <languageKey index="gl" type="array">
+        </languageKey>
+        <languageKey index="th" type="array">
+        </languageKey>
+        <languageKey index="gr" type="array">
+        </languageKey>
+        <languageKey index="hk" type="array">
+        </languageKey>
+        <languageKey index="eu" type="array">
+        </languageKey>
+        <languageKey index="bg" type="array">
+        </languageKey>
+        <languageKey index="br" type="array">
+        </languageKey>
+        <languageKey index="et" type="array">
+        </languageKey>
+        <languageKey index="ar" type="array">
+        </languageKey>
+        <languageKey index="he" type="array">
+        </languageKey>
+        <languageKey index="ua" type="array">
+        </languageKey>
+        <languageKey index="lv" type="array">
+        </languageKey>
+        <languageKey index="jp" type="array">
+        </languageKey>
+        <languageKey index="vn" type="array">
+        </languageKey>
+        <languageKey index="ca" type="array">
+        </languageKey>
+        <languageKey index="ba" type="array">
+        </languageKey>
+        <languageKey index="kr" type="array">
+        </languageKey>
+    </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_ics_generator_mod.xml b/Resources/Private/Language/locallang_ics_generator_mod.xml
new file mode 100644 (file)
index 0000000..2a1a2b5
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+    <meta type="array">
+        <description></description>
+        <type>module</type>
+        <csh_table></csh_table>
+        <labelContext type="array">
+        </labelContext>
+    </meta>
+    <data type="array">
+        <languageKey index="default" type="array">
+            <label index="mlang_tabs_tab">Cal ICS Generator</label>
+            <label index="mlang_labels_tabdescr">Generates ICS content for events</label>
+            <label index="mlang_labels_tablabel">Generates ICS content for events</label>
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+    </data>
+    <orig_hash type="array">
+        <languageKey index="default" type="array">
+            <label index="mlang_tabs_tab" type="integer">58326266</label>
+            <label index="mlang_labels_tabdescr" type="integer">143699304</label>
+            <label index="mlang_labels_tablabel" type="integer">143699304</label>
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+    </orig_hash>
+    <orig_text type="array">
+        <languageKey index="default" type="array">
+        </languageKey>
+        <languageKey index="de" type="array">
+        </languageKey>
+    </orig_text>
+</T3locallang>
\ No newline at end of file
diff --git a/_htaccess b/_htaccess
new file mode 100644 (file)
index 0000000..0644faa
--- /dev/null
+++ b/_htaccess
@@ -0,0 +1,4 @@
+<IfModule mod_rewrite.c>
+  RewriteEngine on
+  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+</IfModule> 
\ No newline at end of file
index 9caacda..10f4326 100755 (executable)
@@ -21,15 +21,8 @@ $TYPO3_MISC['microtime_start'] = microtime(true);
 define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
 define('TYPO3_MODE','FE');
 
-#if(!defined('PATH_thisScript')) {
-##     define('PATH_thisScript', str_replace('//', '/', str_replace('\\', '/',
-##             (PHP_SAPI == 'fpm-fcgi' || PHP_SAPI == 'cgi' || PHP_SAPI == 'isapi' || PHP_SAPI == 'cgi-fcgi') &&
-##             ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) ?
-##             ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) :
-##             ($_SERVER['ORIG_SCRIPT_FILENAME'] ? $_SERVER['ORIG_SCRIPT_FILENAME'] : $_SERVER['SCRIPT_FILENAME']))));
-#      define('PATH_thisScript',str_replace('//', '/', str_replace('\\', '/',dirname($_SERVER['SCRIPT_FILENAME']))));
 $PATH_thisScript = str_replace('//', '/', str_replace('\\', '/',dirname($_SERVER['SCRIPT_FILENAME'])));
-#}
+
 if (!defined('PATH_site'))                     define('PATH_site', str_replace('typo3conf/ext/caldav','',$PATH_thisScript));
 if (!defined('PATH_t3lib'))            define('PATH_t3lib', PATH_site.'t3lib/');
 
@@ -107,10 +100,6 @@ $TSFE->sendRedirect();
 
 $TT->pull();
 
-#require_once(t3lib_extMgm::extPath('simulatestatic').'class.tx_simulatestatic.php');
-#require_once(t3lib_extMgm::extPath('statictemplates').'class.tx_statictemplates.php');
-require_once(t3lib_extMgm::extPath('cal').'model/class.tx_cal_date.php');
-require_once(t3lib_extMgm::extPath('cal').'service/class.tx_cal_icalendar_service.php');
 /*
 
 CalendarServer example
@@ -149,8 +138,9 @@ require_once PATH_typo3conf.'/ext/caldav/lib/Sabre/autoload.php';
 // The object tree needs in turn to be passed to the server class
 $server = new Sabre_CalDAV_TYPO3Server($pdo);
 
-if (isset($baseUri))
+if (isset($baseUri)) {
     $server->setBaseUri($baseUri);
+}
 
 // Support for html frontend
 $browser = new Sabre_DAV_Browser_Plugin();
diff --git a/doc/manual.sxw b/doc/manual.sxw
deleted file mode 100755 (executable)
index 313a95c..0000000
Binary files a/doc/manual.sxw and /dev/null differ
diff --git a/ext_autoload.php b/ext_autoload.php
deleted file mode 100755 (executable)
index a1eca42..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-/*
- * Register necessary class names with autoloader
- *
- */
-// TODO: document necessity of providing autoloader information
-return array(
-);
-?>
index c2cb7d1..7ac2280 100755 (executable)
  * *************************************************************
  */
 
-$EM_CONF[$_EXTKEY] = array(
-       'title' => 'CalDAV',
-       'description' => 'Extends Calendar Base with CalDAV functionality.',
-       'category' => 'plugin',
-       'shy' => 0,
-       'version' => '1.0.0',
-       'loadOrder' => '',
-       'state' => 'stable',
-       'uploadfolder' => 0,
-       'clearCacheOnLoad' => 1,
-       'author' => 'Mario Matzulla',
-       'author_email' => 'mario@matzullas.de',
-       'shy' => '',
-       'constraints' => array (
-               'depends' => array (
-                       'cal' => '1.7.0-' 
-               ),
-       )
+$EM_CONF [$_EXTKEY] = array (
+               'title' => 'CalDAV',
+               'description' => 'Extends Calendar Base with CalDAV functionality.',
+               'category' => 'plugin',
+               'shy' => 0,
+               'version' => '1.1.0',
+               'loadOrder' => '',
+               'state' => 'stable',
+               'uploadfolder' => 0,
+               'clearCacheOnLoad' => 0,
+               'author' => 'Mario Matzulla',
+               'author_email' => 'mario@matzullas.de',
+               'author_company' => '',
+               'constraints' => array (
+                               'depends' => array (
+                                               'cal' => '1.9.0-'
+                               )
+               )
 );
 
+
 ?>
\ No newline at end of file
index b98650f..5c030c8 100755 (executable)
@@ -1,8 +1,8 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
+if (! defined ( 'TYPO3_MODE' )) {
+       die ( 'Access denied.' );
 }
 
-$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:caldav/hooks/class.tx_caldav_tcemain_processdatamap.php:tx_caldav_tcemain_processdatamap';
+$GLOBALS ['TYPO3_CONF_VARS'] ['SC_OPTIONS'] ['t3lib/class.t3lib_tcemain.php'] ['processDatamapClass'] ['tx_caldav'] = 'TYPO3\\CMS\\CalDav\\Hooks\\TceMainProcessdatamap';
 
 ?>
\ No newline at end of file
index d1bc055..8240857 100755 (executable)
@@ -3,8 +3,10 @@ if (!defined ('TYPO3_MODE')) {
        die ('Access denied.');
 }
 
+$extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath ($_EXTKEY);
+
 if (TYPO3_MODE=="BE")  {
-       t3lib_extMgm::addModule("tools","calicsgenerator","",t3lib_extMgm::extPath($_EXTKEY)."mod1/");
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule("tools","calicsgenerator","",$extPath."Classes/Backend/Modul/");
 }
 
 
diff --git a/hooks/class.tx_caldav_tcemain_processdatamap.php b/hooks/class.tx_caldav_tcemain_processdatamap.php
deleted file mode 100755 (executable)
index cccb24b..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2005-2008 Mario Matzulla
- * (c) 2005-2008 Christian Technology Ministries International Inc.
- * All rights reserved
- *
- * This file is part of the Web-Empowered Church (WEC)
- * (http://WebEmpoweredChurch.org) ministry of Christian Technology Ministries 
- * International (http://CTMIinc.org). The WEC is developing TYPO3-based
- * (http://typo3.org) free software for churches around the world. Our desire
- * is to use the Internet to help offer new life through Jesus Christ. Please
- * see http://WebEmpoweredChurch.org/Jesus.
- *
- * You can redistribute this file and/or modify it under the terms of the 
- * GNU General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This file is distributed in the hope that it will be useful for ministry,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the file!
- ***************************************************************/
-
-define('ICALENDAR_PATH',       t3lib_extMgm::extPath('cal').'model/class.tx_model_iCalendar.php');
-#require_once(t3lib_extMgm::extPath('cal').'controller/class.tx_cal_functions.php');
-
-/**
- * This hook extends the tcemain class.
- * It catches changes on tx_cal_event
- *
- * @author     Mario Matzulla <mario(at)matzullas.de>
- */
-class tx_caldav_tcemain_processdatamap {
-
-       
-       function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, &$tcemain) {
-               
-               /* If we have a new calendar event */
-               if (($table == 'tx_cal_event' || $table == 'tx_cal_exception_event') && count($fieldArray)>1) {
-                       require_once(t3lib_extMgm::extPath('cal').'controller/class.tx_cal_functions.php');
-                       require_once(t3lib_extMgm::extPath('cal').'/controller/class.tx_cal_api.php');
-                       $event = t3lib_BEfunc::getRecord ($table, $status=='new'?$tcemain->substNEWwithIDs[$id]:$id);
-                       
-                       /* If we're in a workspace, don't notify anyone about the event */
-                       if($event['pid'] > 0) {
-                               /* Check Page TSConfig for a preview page that we should use */
-                               $pageTSConf = t3lib_befunc::getPagesTSconfig($event['pid']);
-                               if($pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin']) {
-                                       $pageIDForPlugin = $pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin'];
-                               } else {
-                                       $pageIDForPlugin = $event['pid'];
-                               }
-                       
-                               $page = t3lib_BEfunc::getRecord('pages', intval($pageIDForPlugin), 'doktype');
-
-                               if($page['doktype'] != 254) {
-                                       $tx_cal_api = t3lib_div :: makeInstance('tx_cal_api');
-                                       $tx_cal_api = &$tx_cal_api->tx_cal_api_without($pageIDForPlugin);
-
-                                       if($table == 'tx_cal_event'){
-                                               $eventObject = $tx_cal_api->modelObj->findEvent($event['uid'], 'tx_cal_phpicalendar', $tx_cal_api->conf['pidList'], false, false, false, true, true);
-
-                                               if ($eventObject->conf['view.']['event.']['phpicalendarEventTemplate']) {
-                                                       $oldPath = &$eventObject->conf['view.']['event.']['phpicalendarEventTemplate'];
-                                               } else {
-                                                       $oldPath = &$eventObject->conf['view.']['event.']['eventModelTemplate'];
-                                               }
-                                               $oldView = $eventObject->conf['view'];
-                                               $eventObject->conf['view'] = 'single_ics';
-                                               $extPath=t3lib_extMgm::extPath('cal');
-                                               
-                                               $oldPath = 'EXT:cal/standard_template/event_model.tmpl';
-                                               $oldPath = str_replace('EXT:cal/', $extPath, $oldPath);
-                                               //$oldPath = str_replace(PATH_site, '', $oldPath);
-                                               $eventObject->conf['view.']['event.']['phpicalendarEventTemplate'] = $oldPath;
-                                               $eventObject->conf['view.']['event.']['eventModelTemplate'] = $oldPath;
-                                               $oldBackPath = $GLOBALS['TSFE']->tmpl->getFileName_backPath;
-                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = '';
-                                               $fileInfo = t3lib_div::split_fileref($oldPath);
-                                               $GLOBALS['TSFE']->tmpl->allowedPaths[] = $fileInfo['path'];
-                                               
-                                               $viewObj = &tx_cal_registry::Registry('basic','viewcontroller');
-                                               $masterArray = Array($eventObject);
-                                               $drawnIcs = $viewObj->drawIcs($masterArray, '', false);
-                                               $table = 'tx_cal_event';
-                                               $where = 'uid = '.$event['uid'];
-                                               $eventData = Array('tx_caldav_data'=>$drawnIcs);
-                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
-                                               
-                                               $table = 'tx_cal_calendar';
-                                               $where = 'uid = '.$event['calendar_id'];
-                                               $eventData = Array('tstamp'=>time());
-                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
-
-                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = $oldBackPath;
-                                               $eventObject->conf['view'] = $oldView;
-                                       }
-                               }
-                       }
-               } 
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/hooks/class.tx_caldav_tcemain_processdatamap.php']) {
-       include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/hooks/class.tx_caldav_tcemain_processdatamap.php']);
-}
-?>
\ No newline at end of file
index bcafef9..c00a684 100755 (executable)
@@ -7,34 +7,33 @@
  *
  * @package Sabre
  * @subpackage CalDAV
- * @copyright Copyright (C) 2012 Mario Matzulla. All rights reserved.
+ * @copyright Copyright (C) 2012-2015 Mario Matzulla. All rights reserved.
  * @author Mario Matzulla (http://www.matzullas.de)
  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
  */
 class Sabre_CalDAV_Backend_TYPO3 extends Sabre_CalDAV_Backend_Abstract {
-
+       
        /**
         * pdo
         *
         * @var PDO
         */
        private $pdo;
-
+       
        /**
         * The table name that will be used for calendars
         *
         * @var string
         */
        protected $calendarTableName;
-
+       
        /**
         * The table name that will be used for calendar objects
         *
         * @var string
         */
        protected $calendarObjectTableName;
-
-
+       
        /**
         * List of CalDAV properties, and how they map to database fieldnames
         *
@@ -42,134 +41,130 @@ class Sabre_CalDAV_Backend_TYPO3 extends Sabre_CalDAV_Backend_Abstract {
         *
         * @var array
         */
-       public $propertyMap = array(
-                       '{DAV:}displayname'                          => 'title',
+       public $propertyMap = array (
+                       '{DAV:}displayname' => 'title',
                        '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'tx_caldav_data',
-                       '{urn:ietf:params:xml:ns:caldav}calendar-timezone'    => 'timezone',
-                       '{http://apple.com/ns/ical/}calendar-order'  => 'calendarorder',
-                       '{http://apple.com/ns/ical/}calendar-color'  => 'calendarcolor',
+                       '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
+                       '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
+                       '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor' 
        );
-
+       
        /**
         * Creates the backend
         *
-        * @param PDO $pdo
+        * @param PDO $pdo              
         */
        public function __construct(PDO $pdo, $calendarTableName = 'calendars', $calendarObjectTableName = 'calendarobjects') {
-
                $this->pdo = $pdo;
                $this->calendarTableName = $calendarTableName;
                $this->calendarObjectTableName = $calendarObjectTableName;
-
        }
-
+       
        /**
         * Returns a list of calendars for a principal.
         *
         * Every project is an array with the following keys:
-        *  * id, a unique id that will be used by other functions to modify the
-        *    calendar. This can be the same as the uri or a database key.
-        *  * uri, which the basename of the uri with which the calendar is
-        *    accessed.
-        *  * principalUri. The owner of the calendar. Almost always the same as
-        *    principalUri passed to this method.
+        * * id, a unique id that will be used by other functions to modify the
+        * calendar. This can be the same as the uri or a database key.
+        * * uri, which the basename of the uri with which the calendar is
+        * accessed.
+        * * principalUri. The owner of the calendar. Almost always the same as
+        * principalUri passed to this method.
         *
         * Furthermore it can contain webdav properties in clark notation. A very
         * common one is '{DAV:}displayname'.
         *
-        * @param string $principalUri
+        * @param string $principalUri          
         * @return array
         */
        public function getCalendarsForUser($principalUri) {
-               $principalUriParts = explode("/",$principalUri);
-               $stmt = $this->pdo->prepare("SELECT uid, tx_cal_calendar FROM fe_users WHERE username = ? AND deleted=0");
-               $stmt->execute(array(array_pop($principalUriParts)));
-
-               $calendars = array();
-
-               while($user = $stmt->fetch(PDO::FETCH_ASSOC)) {
-
-                       $stmt = $this->pdo->prepare("SELECT * FROM tx_cal_calendar WHERE uid in (".$user['tx_cal_calendar'].")");
-                       $stmt->execute();
-                        
-                       while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
-
-                               $components = explode(',','VEVENT,VTODO');
-                                
-                               $calendar = array(
-                                               'id' => $row['uid'],
-                                               'uri' => $row['title'],
+               $principalUriParts = explode ( "/", $principalUri );
+               $stmt = $this->pdo->prepare ( "SELECT uid, tx_cal_calendar FROM fe_users WHERE username = ? AND deleted=0" );
+               $stmt->execute ( array (
+                               array_pop ( $principalUriParts ) 
+               ) );
+               
+               $calendars = array ();
+               
+               while ( $user = $stmt->fetch ( PDO::FETCH_ASSOC ) ) {
+                       
+                       $stmt = $this->pdo->prepare ( "SELECT * FROM tx_cal_calendar WHERE uid in (" . $user ['tx_cal_calendar'] . ")" );
+                       $stmt->execute ();
+                       
+                       while ( $row = $stmt->fetch ( PDO::FETCH_ASSOC ) ) {
+                               
+                               $components = explode ( ',', 'VEVENT,VTODO' );
+                               
+                               $calendar = array (
+                                               'id' => $row ['uid'],
+                                               'uri' => $row ['title'],
                                                'principaluri' => $principalUri,
-                                               '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $row['tstamp']?$row['tstamp']:'0',
-                                               '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet($components),
-                                               '{DAV:}displayname'                          => $row['title'],
+                                               '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}getctag' => $row ['tstamp'] ? $row ['tstamp'] : '0',
+                                               '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre_CalDAV_Property_SupportedCalendarComponentSet ( $components ),
+                                               '{DAV:}displayname' => $row ['title'],
                                                '{urn:ietf:params:xml:ns:caldav}calendar-description' => '',
-                                               '{urn:ietf:params:xml:ns:caldav}calendar-timezone'    => null,
-                                               '{http://apple.com/ns/ical/}calendar-order'  => 0,
-                                               '{http://apple.com/ns/ical/}calendar-color'  => null,
+                                               '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => null,
+                                               '{http://apple.com/ns/ical/}calendar-order' => 0,
+                                               '{http://apple.com/ns/ical/}calendar-color' => null 
                                );
-           
-                               $calendars[] = $calendar;
-
+                               
+                               $calendars [] = $calendar;
                        }
                }
-
+               
                return $calendars;
-
        }
-
+       
        /**
         * Creates a new calendar for a principal.
         *
         * If the creation was a success, an id must be returned that can be used to reference
         * this calendar in other methods, such as updateCalendar
         *
-        * @param string $principalUri
-        * @param string $calendarUri
-        * @param array $properties
+        * @param string $principalUri          
+        * @param string $calendarUri           
+        * @param array $properties             
         * @return mixed
         */
-       public function createCalendar($principalUri,$calendarUri, array $properties) {
-
-               $fieldNames = array(
+       public function createCalendar($principalUri, $calendarUri, array $properties) {
+               $fieldNames = array (
                                'principaluri',
                                'uri',
-                               'ctag',
+                               'ctag' 
                );
-               $values = array(
+               $values = array (
                                ':principaluri' => $principalUri,
-                               ':uri'          => $calendarUri,
-                               ':ctag'         => 1,
+                               ':uri' => $calendarUri,
+                               ':ctag' => 1 
                );
-
+               
                // Default value
                $sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
-               $fieldNames[] = 'components';
-               if (!isset($properties[$sccs])) {
-                       $values[':components'] = 'VEVENT,VTODO';
+               $fieldNames [] = 'components';
+               if (! isset ( $properties [$sccs] )) {
+                       $values [':components'] = 'VEVENT,VTODO';
                } else {
-                       if (!($properties[$sccs] instanceof Sabre_CalDAV_Property_SupportedCalendarComponentSet)) {
-                               throw new Sabre_DAV_Exception('The ' . $sccs . ' property must be of type: Sabre_CalDAV_Property_SupportedCalendarComponentSet');
+                       if (! ($properties [$sccs] instanceof Sabre_CalDAV_Property_SupportedCalendarComponentSet)) {
+                               throw new Sabre_DAV_Exception ( 'The ' . $sccs . ' property must be of type: Sabre_CalDAV_Property_SupportedCalendarComponentSet' );
                        }
-                       $values[':components'] = implode(',',$properties[$sccs]->getValue());
+                       $values [':components'] = implode ( ',', $properties [$sccs]->getValue () );
                }
-
-               foreach($this->propertyMap as $xmlName=>$dbName) {
-                       if (isset($properties[$xmlName])) {
-
-                               $myValue = $properties[$xmlName];
-                               $values[':' . $dbName] = $properties[$xmlName];
-                               $fieldNames[] = $dbName;
+               
+               foreach ( $this->propertyMap as $xmlName => $dbName ) {
+                       if (isset ( $properties [$xmlName] )) {
+                               
+                               $myValue = $properties [$xmlName];
+                               $values [':' . $dbName] = $properties [$xmlName];
+                               $fieldNames [] = $dbName;
                        }
                }
-
-               $stmt = $this->pdo->prepare("INSERT INTO tx_cal_calendar (".implode(', ', $fieldNames).") VALUES (".implode(', ',array_keys($values)).")");
-               $stmt->execute($values);
-
-               return $this->pdo->lastInsertId();
-
+               
+               $stmt = $this->pdo->prepare ( "INSERT INTO tx_cal_calendar (" . implode ( ', ', $fieldNames ) . ") VALUES (" . implode ( ', ', array_keys ( $values ) ) . ")" );
+               $stmt->execute ( $values );
+               
+               return $this->pdo->lastInsertId ();
        }
-
+       
        /**
         * Updates a calendars properties
         *
@@ -190,298 +185,319 @@ class Sabre_CalDAV_Backend_TYPO3 extends Sabre_CalDAV_Backend_Abstract {
         * structure:
         *
         * array(
-        *   403 => array(
-        *      '{DAV:}displayname' => null,
-        *   ),
-        *   424 => array(
-        *      '{DAV:}owner' => null,
-        *   )
+        * 403 => array(
+        * '{DAV:}displayname' => null,
+        * ),
+        * 424 => array(
+        * '{DAV:}owner' => null,
+        * )
         * )
         *
         * In this example it was forbidden to update {DAV:}displayname.
         * (403 Forbidden), which in turn also caused {DAV:}owner to fail
         * (424 Failed Dependency) because the request needs to be atomic.
         *
-        * @param string $calendarId
-        * @param array $properties
+        * @param string $calendarId            
+        * @param array $properties             
         * @return bool|array
         */
        public function updateCalendar($calendarId, array $properties) {
-
-               $newValues = array();
-               $result = array(
-                               200 => array(), // Ok
-                               403 => array(), // Forbidden
-                               424 => array(), // Failed Dependency
-               );
-
+               $newValues = array ();
+               $result = array (
+                               200 => array (), // Ok
+                               403 => array (), // Forbidden
+                               424 => array ()  // Failed Dependency
+                               );
+               
                $hasError = false;
-
-               foreach($properties as $propertyName=>$propertyValue) {
-
+               
+               foreach ( $properties as $propertyName => $propertyValue ) {
+                       
                        // We don't know about this property.
-                       if (!isset($this->propertyMap[$propertyName])) {
+                       if (! isset ( $this->propertyMap [$propertyName] )) {
                                $hasError = true;
-                               $result[403][$propertyName] = null;
-                               unset($properties[$propertyName]);
+                               $result [403] [$propertyName] = null;
+                               unset ( $properties [$propertyName] );
                                continue;
                        }
-
-                       $fieldName = $this->propertyMap[$propertyName];
-                       $newValues[$fieldName] = $propertyValue;
-
+                       
+                       $fieldName = $this->propertyMap [$propertyName];
+                       $newValues [$fieldName] = $propertyValue;
                }
-
+               
                // If there were any errors we need to fail the request
                if ($hasError) {
                        // Properties has the remaining properties
-                       foreach($properties as $propertyName=>$propertyValue) {
-                               $result[424][$propertyName] = null;
+                       foreach ( $properties as $propertyName => $propertyValue ) {
+                               $result [424] [$propertyName] = null;
                        }
-
+                       
                        // Removing unused statuscodes for cleanliness
-                       foreach($result as $status=>$properties) {
-                               if (is_array($properties) && count($properties)===0) unset($result[$status]);
+                       foreach ( $result as $status => $properties ) {
+                               if (is_array ( $properties ) && count ( $properties ) === 0)
+                                       unset ( $result [$status] );
                        }
                        return $result;
-
                }
-
+               
                // Success
-
+               
                // Now we're generating the sql query.
-               $valuesSql = array();
-               foreach($newValues as $fieldName=>$value) {
-                       $valuesSql[] = $fieldName . ' = ?';
+               $valuesSql = array ();
+               foreach ( $newValues as $fieldName => $value ) {
+                       $valuesSql [] = $fieldName . ' = ?';
                }
-               $valuesSql[] = time();
-
-               $stmt = $this->pdo->prepare("UPDATE tx_cal_calendar SET " . implode(', ',$valuesSql) . " WHERE id = ?");
-               $newValues['id'] = $calendarId;
-               $stmt->execute(array_values($newValues));
-
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_calendar WHERE uid = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-               $this->clearCache($calendarRow['pid']);
-
+               $valuesSql [] = time ();
+               
+               $stmt = $this->pdo->prepare ( "UPDATE tx_cal_calendar SET " . implode ( ', ', $valuesSql ) . " WHERE id = ?" );
+               $newValues ['id'] = $calendarId;
+               $stmt->execute ( array_values ( $newValues ) );
+               
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_calendar WHERE uid = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               $this->clearCache ( $calendarRow ['pid'] );
+               
                return true;
-
        }
-
+       
        /**
         * Delete a calendar and all it's objects
         *
-        * @param string $calendarId
+        * @param string $calendarId            
         * @return void
         */
        public function deleteCalendar($calendarId) {
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_calendar WHERE uid = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-
-               $stmt = $this->pdo->prepare('DELETE FROM tx_cal_event WHERE calendar_id = ?');
-               $stmt->execute(array($calendarId));
-
-               $stmt = $this->pdo->prepare('DELETE FROM tx_cal_calendar WHERE uid = ?');
-               $stmt->execute(array($calendarId));
-               $this->clearCache($calendarRow['pid']);
-
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_calendar WHERE uid = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               
+               $stmt = $this->pdo->prepare ( 'DELETE FROM tx_cal_event WHERE calendar_id = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               
+               $stmt = $this->pdo->prepare ( 'DELETE FROM tx_cal_calendar WHERE uid = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $this->clearCache ( $calendarRow ['pid'] );
        }
-
+       
        /**
         * Returns all calendar objects within a calendar object.
         *
         * Every item contains an array with the following keys:
-        *   * id - unique identifier which will be used for subsequent updates
-        *   * calendardata - The iCalendar-compatible calnedar data
-        *   * uri - a unique key which will be used to construct the uri. This can be any arbitrary string.
-        *   * lastmodified - a timestamp of the last modification time
+        * * id - unique identifier which will be used for subsequent updates
+        * * calendardata - The iCalendar-compatible calnedar data
+        * * uri - a unique key which will be used to construct the uri. This can be any arbitrary string.
+        * * lastmodified - a timestamp of the last modification time
         *
-        * @param string $calendarId
+        * @param string $calendarId            
         * @return array
         */
        public function getCalendarObjects($calendarId) {
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_event WHERE calendar_id = ? AND deleted = 0');
-               $stmt->execute(array($calendarId));
-               $eventArray = $stmt->fetchAll();
-               $preparedArray = Array();
-               foreach($eventArray as $eventRow){
-                       if($eventRow['tx_caldav_uid']=='' && $eventRow['icsUid']==''){
-                               $eventRow['tx_caldav_uid'] = 'a1b2c3_'.$eventRow['calendar_id'].'_'.$eventRow['uid'];
-                               $eventRow['icsUid'] = $eventRow['tx_caldav_uid'];
-                               $stmt = $this->pdo->prepare("UPDATE tx_cal_event SET tx_caldav_uid = ?, icsUid = ? WHERE uid = ?");
-                               $stmt->execute(Array($eventRow['tx_caldav_uid'], $eventRow['icsUid'], $eventRow['uid']));
-                                
-                       } else if($eventRow['tx_caldav_uid']==''){
-                               $eventRow['tx_caldav_uid'] = $eventRow['icsUid'];
-                               $stmt = $this->pdo->prepare("UPDATE tx_cal_event SET tx_caldav_uid = ? WHERE uid = ?");
-                               $stmt->execute(Array($eventRow['tx_caldav_uid'], $eventRow['uid']));
-                                
-                       } else if($eventRow['icsUid']==''){
-                               $eventRow['icsUid'] = $eventRow['tx_caldav_uid'];
-                               $stmt = $this->pdo->prepare("UPDATE tx_cal_event SET icsUid = ? WHERE uid = ?");
-                               $stmt->execute(Array($eventRow['icsUid'], $eventRow['uid']));
-                                
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_event WHERE calendar_id = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $eventArray = $stmt->fetchAll ();
+               $preparedArray = Array ();
+               foreach ( $eventArray as $eventRow ) {
+                       if ($eventRow ['tx_caldav_uid'] == '' && $eventRow ['icsUid'] == '') {
+                               $eventRow ['tx_caldav_uid'] = 'a1b2c3_' . $eventRow ['calendar_id'] . '_' . $eventRow ['uid'];
+                               $eventRow ['icsUid'] = $eventRow ['tx_caldav_uid'];
+                               $stmt = $this->pdo->prepare ( "UPDATE tx_cal_event SET tx_caldav_uid = ?, icsUid = ? WHERE uid = ?" );
+                               $stmt->execute ( Array (
+                                               $eventRow ['tx_caldav_uid'],
+                                               $eventRow ['icsUid'],
+                                               $eventRow ['uid'] 
+                               ) );
+                       } else if ($eventRow ['tx_caldav_uid'] == '') {
+                               $eventRow ['tx_caldav_uid'] = $eventRow ['icsUid'];
+                               $stmt = $this->pdo->prepare ( "UPDATE tx_cal_event SET tx_caldav_uid = ? WHERE uid = ?" );
+                               $stmt->execute ( Array (
+                                               $eventRow ['tx_caldav_uid'],
+                                               $eventRow ['uid'] 
+                               ) );
+                       } else if ($eventRow ['icsUid'] == '') {
+                               $eventRow ['icsUid'] = $eventRow ['tx_caldav_uid'];
+                               $stmt = $this->pdo->prepare ( "UPDATE tx_cal_event SET icsUid = ? WHERE uid = ?" );
+                               $stmt->execute ( Array (
+                                               $eventRow ['icsUid'],
+                                               $eventRow ['uid'] 
+                               ) );
                        }
-                       $preparedArray[] = Array(
-                                       'id' => $eventRow['uid'],
-                                       'displayname' => $eventRow['title'],
-                                       'calendardata' => $eventRow['tx_caldav_data'],
-                                       'uri' => $eventRow['tx_caldav_uid'],
+                       $preparedArray [] = Array (
+                                       'id' => $eventRow ['uid'],
+                                       'displayname' => $eventRow ['title'],
+                                       'calendardata' => $eventRow ['tx_caldav_data'],
+                                       'uri' => $eventRow ['tx_caldav_uid'],
                                        'calendarid' => $calendarId,
-                                       'lastmodified' => $eventRow['tstamp']
+                                       'lastmodified' => $eventRow ['tstamp'] 
                        );
                }
                return $preparedArray;
-
        }
-
+       
        /**
         * Returns information from a single calendar object, based on it's object uri.
         *
-        * @param string $calendarId
-        * @param string $objectUri
+        * @param string $calendarId            
+        * @param string $objectUri             
         * @return array
         */
-       public function getCalendarObject($calendarId,$objectUri) {
-
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_event WHERE calendar_id = ? AND tx_caldav_uid = ? AND deleted = 0');
-               $stmt->execute(array($calendarId, $objectUri));
-               $eventRow = $stmt->fetch();
-               if(empty($eventRow)){
-                       return Array();
+       public function getCalendarObject($calendarId, $objectUri) {
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_event WHERE calendar_id = ? AND tx_caldav_uid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId,
+                               $objectUri 
+               ) );
+               $eventRow = $stmt->fetch ();
+               if (empty ( $eventRow )) {
+                       return Array ();
                }
-               return Array(
-                               'id' => $eventRow['uid'],
-                               'displayname' => $eventRow['title'],
-                               'calendardata' => $eventRow['tx_caldav_data'],
-                               'uri' => $eventRow['icsUid'],
+               return Array (
+                               'id' => $eventRow ['uid'],
+                               'displayname' => $eventRow ['title'],
+                               'calendardata' => $eventRow ['tx_caldav_data'],
+                               'uri' => $eventRow ['icsUid'],
                                'calendarid' => $calendarId,
-                               'lastmodified' => $eventRow['tstamp']
+                               'lastmodified' => $eventRow ['tstamp'] 
                );
-
        }
-
+       
        /**
         * Creates a new calendar object.
         *
-        * @param string $calendarId
-        * @param string $objectUri
-        * @param string $calendarData
+        * @param string $calendarId            
+        * @param string $objectUri             
+        * @param string $calendarData          
         * @return void
         */
-       public function createCalendarObject($calendarId,$objectUri,$calendarData) {
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_calendar WHERE uid = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-
-               $stmt = $this->pdo->prepare('INSERT INTO tx_cal_event (pid,calendar_id, tx_caldav_uid, tx_caldav_data, tstamp) VALUES (?,?,?,?,?)');
-               $uid = $this->pdo->lastInsertId();
-               $stmt->execute(array($calendarRow['pid'],$calendarId,$objectUri,$calendarData,time()));
-               $stmt = $this->pdo->prepare('UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0');
-               $stmt->execute(array($calendarId));
-               $this->updateCalEvent($calendarId,$objectUri,$calendarData);
-               $this->clearCache($calendarRow['pid']);
+       public function createCalendarObject($calendarId, $objectUri, $calendarData) {
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_calendar WHERE uid = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               
+               $stmt = $this->pdo->prepare ( 'INSERT INTO tx_cal_event (pid,calendar_id, tx_caldav_uid, tx_caldav_data, tstamp) VALUES (?,?,?,?,?)' );
+               $uid = $this->pdo->lastInsertId ();
+               $stmt->execute ( array (
+                               $calendarRow ['pid'],
+                               $calendarId,
+                               $objectUri,
+                               $calendarData,
+                               time () 
+               ) );
+               $stmt = $this->pdo->prepare ( 'UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $this->updateCalEvent ( $calendarId, $objectUri, $calendarData );
+               $this->clearCache ( $calendarRow ['pid'] );
        }
-
+       
        /**
         * Updates an existing calendarobject, based on it's uri.
         *
-        * @param string $calendarId
-        * @param string $objectUri
-        * @param string $calendarData
+        * @param string $calendarId            
+        * @param string $objectUri             
+        * @param string $calendarData          
         * @return void
         */
-       public function updateCalendarObject($calendarId,$objectUri,$calendarData) {
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_event WHERE calendar_id = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-               $stmt = $this->pdo->prepare('UPDATE tx_cal_event SET tx_caldav_data = ?, tstamp = ? WHERE calendar_id = ? AND icsUid = ? AND deleted = 0');
-               $stmt->execute(array($calendarData,time(),$calendarId,$objectUri));
-               $stmt = $this->pdo->prepare('UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0');
-               $stmt->execute(array($calendarId));
-               $this->updateCalEvent($calendarId,$objectUri,$calendarData);
-               $this->clearCache($calendarRow['pid']);
+       public function updateCalendarObject($calendarId, $objectUri, $calendarData) {
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_event WHERE calendar_id = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               $stmt = $this->pdo->prepare ( 'UPDATE tx_cal_event SET tx_caldav_data = ?, tstamp = ? WHERE calendar_id = ? AND icsUid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarData,
+                               time (),
+                               $calendarId,
+                               $objectUri 
+               ) );
+               $stmt = $this->pdo->prepare ( 'UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $this->updateCalEvent ( $calendarId, $objectUri, $calendarData );
+               $this->clearCache ( $calendarRow ['pid'] );
        }
-
+       
        /**
         * Deletes an existing calendar object.
         *
-        * @param string $calendarId
-        * @param string $objectUri
+        * @param string $calendarId            
+        * @param string $objectUri             
         * @return void
         */
-       public function deleteCalendarObject($calendarId,$objectUri) {
-
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_event WHERE calendar_id = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-
-               $stmt = $this->pdo->prepare('DELETE FROM tx_cal_event WHERE calendar_id = ? AND icsUid = ? AND deleted = 0');
-               $stmt->execute(array($calendarId,$objectUri));
-               $stmt = $this->pdo->prepare('UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0');
-               $stmt->execute(array($calendarId));
-               $this->clearCache($calendarRow['pid']);
+       public function deleteCalendarObject($calendarId, $objectUri) {
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_event WHERE calendar_id = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               
+               $stmt = $this->pdo->prepare ( 'DELETE FROM tx_cal_event WHERE calendar_id = ? AND icsUid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId,
+                               $objectUri 
+               ) );
+               $stmt = $this->pdo->prepare ( 'UPDATE tx_cal_calendar SET tstamp = tstamp + 1 WHERE uid = ? AND deleted = 0' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $this->clearCache ( $calendarRow ['pid'] );
        }
-
-
-       private function updateCalEvent($calendarId, $objectUri, $calendarData){
-                       
-               $stmt = $this->pdo->prepare('SELECT * FROM tx_cal_calendar WHERE uid = ?');
-               $stmt->execute(array($calendarId));
-               $calendarRow = $stmt->fetch();
-               $pageTSConf = t3lib_befunc::getPagesTSconfig($calendarRow['pid']);
-               if($pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin']) {
-                       $pageIDForPlugin = $pageTSConf['options.']['tx_cal_controller.']['pageIDForPlugin'];
-               } else {
-                       $pageIDForPlugin = $calendarRow['pid'];
+       private function updateCalEvent($calendarId, $objectUri, $calendarData) {
+               $stmt = $this->pdo->prepare ( 'SELECT * FROM tx_cal_calendar WHERE uid = ?' );
+               $stmt->execute ( array (
+                               $calendarId 
+               ) );
+               $calendarRow = $stmt->fetch ();
+               $pageTSConf = t3lib_befunc::getPagesTSconfig ( $calendarRow ['pid'] );
+               $pageIDForPlugin = $calendarRow ['pid'];
+               if ($pageTSConf ['options.'] ['tx_cal_controller.'] ['pageIDForPlugin']) {
+                       $pageIDForPlugin = $pageTSConf ['options.'] ['tx_cal_controller.'] ['pageIDForPlugin'];
                }
-               require_once(t3lib_extMgm::extPath('cal').'/controller/class.tx_cal_api.php');
-               $tx_cal_api = t3lib_div :: makeInstance('tx_cal_api');
-               $tx_cal_api = &$tx_cal_api->tx_cal_api_without($pageIDForPlugin);
-               require_once(t3lib_extMgm::extPath('cal').'service/class.tx_cal_icalendar_service.php');
-               $service = new tx_cal_icalendar_service();
-               $components = $service->getiCalendarFromIcsFile($calendarData);
-               foreach($components->_components as $component){
-                       if (is_a($component,'tx_iCalendar_vevent')){
-                               $stmt = $this->pdo->prepare('UPDATE tx_cal_event SET icsUid = ? WHERE tx_caldav_uid = ?');
-                               $stmt->execute(array($component->getAttribute('UID'),$objectUri));
+               $calAPI = new \TYPO3\CMS\Cal\Controller\Api ();
+               $calAPI = &$calAPI->tx_cal_api_without ( $pageIDForPlugin );
+               
+               $service = new \TYPO3\CMS\Cal\Service\ICalendarService ();
+               $components = $service->getiCalendarFromIcsFile ( $calendarData );
+               $logger = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__);
+               
+               foreach ( $components->_components as $component ) {
+                       if (is_a ( $component, '\TYPO3\CMS\Cal\Model\ICalendar\vevent' )) {
+                               $logger->info('is_a vevent');
+                               $logger->info($component->getAttribute('UID'));
+                               $stmt = $this->pdo->prepare ( 'UPDATE tx_cal_event SET icsUid = ? WHERE tx_caldav_uid = ?' );
+                               $stmt->execute ( array (
+                                               $component->getAttribute ( 'UID' ),
+                                               $objectUri 
+                               ) );
                        }
                }
-               $service->insertCalEventsIntoDB($components->_components, $calendarId, $calendarRow['pid'], 0, 0);
-               $this->clearCache($calendarRow['pid']);
+               $service->insertCalEventsIntoDB ( $components->_components, $calendarId, $calendarRow ['pid'], 0, 0 );
+               $this->clearCache ( $calendarRow ['pid'] );
        }
-
-       private function clearCache($pid){
-                
-               $pageTSConf = t3lib_befunc::getPagesTSconfig($pid);
-               if($pageTSConf['TCEMAIN.']['clearCacheCmd']) {
-                       $pageIDForPlugin = $pageTSConf['TCEMAIN.']['clearCacheCmd'];
-               } else {
-                       $pageIDForPlugin = $pid;
+       private function clearCache($pid) {
+               $pageTSConf = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig ( $pid );
+               $pageIDForPlugin = $pid;
+               
+               if ($pageTSConf ['TCEMAIN.'] ['clearCacheCmd']) {
+                       $pageIDForPlugin = $pageTSConf ['TCEMAIN.'] ['clearCacheCmd'];
                }
-
-//             define("PATH_typo3conf", dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))."/");
-//             define("PATH_site", dirname(PATH_typo3conf)."/");
-//             define("PATH_typo3", PATH_site."typo3/");       // Typo-configuraton path
-//             define("PATH_t3lib", PATH_site."t3lib/");
-//             define('TYPO3_MODE','BE');
-//             ini_set('error_reporting', E_ALL ^ E_NOTICE);
-
-//             require_once (PATH_t3lib.'class.t3lib_div.php');
-//             require_once (PATH_t3lib.'class.t3lib_extmgm.php');
-//             require_once (PATH_t3lib.'class.t3lib_tcemain.php');
-
-//             require_once(PATH_t3lib.'config_default.php');
-
-//             if (!defined ("TYPO3_db")) die ("The configuration file was not included.");
-//             require_once(PATH_t3lib.'class.t3lib_db.php');          // The database library
-//             $TYPO3_DB = t3lib_div::makeInstance('t3lib_db');
-//             $TYPO3_DB->sql_pconnect (TYPO3_db_host, TYPO3_db_username, TYPO3_db_password);
-//             $TYPO3_DB->sql_select_db (TYPO3_db);
-
-               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
-               $tce->clear_cacheCmd($pageIDForPlugin);  // ID of the page for which to clear the cache
+               
+               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance ( 'TYPO3\\CMS\\Core\\DataHandling\\DataHandler' );
+//             $tce->clear_cacheCmd ( $pageIDForPlugin ); // ID of the page for which to clear the cache
        }
 }
\ No newline at end of file
index 74317fc..5785216 100755 (executable)
@@ -7,7 +7,7 @@
  * 
  * @package Sabre
  * @subpackage DAV
- * @copyright Copyright (C) 2012 Mario Matzulla. All rights reserved.
+ * @copyright Copyright (C) 2012-2015 Mario Matzulla. All rights reserved.
  * @author Mario Matzulla (http://www.matzullas.de)
  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
  */
index 8262cf2..af49ec8 100644 (file)
@@ -11,8 +11,8 @@
  *
  * @package Sabre
  * @subpackage DAVACL
- * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/) 
+ * @copyright Copyright (C) 2012-2015 Mario Matzulla. All rights reserved.
+ * @author Mario Matzulla (http://www.matzullas.de)
  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
  */
 class Sabre_DAVACL_PrincipalBackend_TYPO3 implements Sabre_DAVACL_IPrincipalBackend {
@@ -70,19 +70,19 @@ class Sabre_DAVACL_PrincipalBackend_TYPO3 implements Sabre_DAVACL_IPrincipalBack
      * @return array 
      */
     public function getPrincipalsByPrefix($prefixPath) {
-        $result = $this->pdo->query('SELECT uri, email, displayname FROM `'. $this->tableName . '`');
+        $result = $this->pdo->query('SELECT username, email, name FROM `'. $this->tableName . '`');
 
         $principals = array();
 
         while($row = $result->fetch(PDO::FETCH_ASSOC)) {
 
             // Checking if the principal is in the prefix
-            list($rowPrefix) = Sabre_DAV_URLUtil::splitPath($row['uri']);
+            list($rowPrefix) = Sabre_DAV_URLUtil::splitPath('principals/'.$row['username']);
             if ($rowPrefix !== $prefixPath) continue;
 
             $principals[] = array(
-                'uri' => $row['uri'],
-                '{DAV:}displayname' => $row['displayname']?$row['displayname']:basename($row['uri']),
+                'uri' => 'principals/'.$row['username'],
+                '{DAV:}displayname' => $row['name']?$row['name']:basename('principals/'.$row['username']),
                 '{http://sabredav.org/ns}email-address' => $row['email'],
             );
 
diff --git a/locallang_db.xml b/locallang_db.xml
deleted file mode 100755 (executable)
index a05009f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-       <meta type="array">
-               <type>database</type>
-               <description>Language labels for database tables/fields belonging to extension 'caldav'</description>
-       </meta>
-       <data type="array">
-               <languageKey index="default" type="array">
-                       <label index="caldav_data">CalDAV data</label>
-               </languageKey>
-       </data>
-</T3locallang>
\ No newline at end of file
diff --git a/mod1/class.tx_cal_ics_generator.php b/mod1/class.tx_cal_ics_generator.php
deleted file mode 100644 (file)
index 864a92c..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-require_once (t3lib_extMgm::extPath('cal').'controller/class.tx_cal_registry.php');
-       
-       /* 
-       * @author: Mario Matzulla
-       */
-       class tx_cal_ics_generator {
-               
-               var $info = '';
-               var $pageIDForPlugin;
-               var $extConf;
-               var $table = 'tx_cal_event,tx_cal_calendar';
-               var $where = 'tx_cal_event.calendar_id = tx_cal_calendar.uid and tx_cal_calendar.type = 0 and tx_cal_calendar.nearby = 0 and tx_cal_event.type in (0,1,2,3) and tx_cal_event.deleted = 0 and tx_cal_event.hidden = 0 and tx_cal_calendar.deleted = 0 and tx_cal_calendar.hidden = 0 and ((tx_cal_event.tx_caldav_data is null) or (tx_cal_event.tx_caldav_data like "%no event model template file found%" OR tx_cal_event.tx_caldav_data like "%no event model template file found:%"))';
-               
-               function tx_cal_ics_generator($pageIDForPlugin) {
-                       $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cal']);
-                       $this->pageIDForPlugin = $pageIDForPlugin;
-               }
-               
-               function getInfo() {
-                       return $this->info;
-               }
-               
-               function check(){
-                       $select = 'tx_cal_event.*';
-                       $table = $this->table;
-                       $where = $this->where;
-                       
-                       $return = '';
-
-                       $results = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $table, $where);
-                       if($results) {
-                               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($results)){
-                                       $return .= '<p>UID '.$row['uid'].' PID '.$row['pid'].' -> '.$row['tx_caldav_data'].'</p><br />';
-                               }
-                               $GLOBALS['TYPO3_DB']->sql_free_result($results);
-                       }
-                       if($return == ''){
-                               $return = 'no problems found';
-                       }
-                       return $return;
-               }
-                               
-               function countEventsWithoutIcs($eventPage=0) {
-                       $count = 0;
-                       $select = 'count(*)';
-                       $table = $this->table;
-                       $where = $this->where;
-                       if($eventPage > 0){
-                               $where = 'pid = '.$eventPage.' AND '.$where;
-                       }
-                       $results = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $table, $where);
-                       if($results) {
-                               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($results)){
-                                       $count = $row['count(*)'];
-                               }
-                               $GLOBALS['TYPO3_DB']->sql_free_result($results);
-                       }
-                       
-                       return $count;
-               }
-               
-               function generateIcs($eventPage=0) {
-                       require_once(t3lib_extMgm::extPath('cal').'controller/class.tx_cal_functions.php');
-                       require_once(t3lib_extMgm::extPath('cal').'/controller/class.tx_cal_api.php');
-                       
-                       $select = 'tx_cal_event.*';
-                       $table = $this->table;
-                       $where = $this->where;
-                       if($eventPage > 0){
-                               $where = 'pid = '.$eventPage.' AND '.$where;
-                       }
-
-                       $results = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $table, $where);
-                       if($results) {
-                               while ($event = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($results)){
-                                       $eventArray[] = $event;
-                               }
-                               $GLOBALS['TYPO3_DB']->sql_free_result($results);
-                               
-                               $page = t3lib_BEfunc::getRecord('pages', intval($this->pageIDForPlugin), 'doktype');
-                               if($page['doktype'] != 254) {
-
-                                       $tx_cal_api = t3lib_div :: makeInstance('tx_cal_api');
-                                       $tx_cal_api = &$tx_cal_api->tx_cal_api_without($this->pageIDForPlugin);
-
-                                       foreach($eventArray as $event){
-
-                                               if($event['pid'] > 0) {
-                                                       /* Check Page TSConfig for a preview page that we should use */
-                                                       $eventObject = $tx_cal_api->modelObj->findEvent($event['uid'], 'tx_cal_phpicalendar', '', false, false, false, true, true);
-                                                       if(is_object($eventObject)){
-                                                               if ($eventObject->conf['view.']['event.']['phpicalendarEventTemplate']) {
-                                                                       $oldPath = &$eventObject->conf['view.']['event.']['phpicalendarEventTemplate'];
-                                                               } else {
-                                                                       $oldPath = &$eventObject->conf['view.']['event.']['eventModelTemplate'];
-                                                               }
-       
-                                                               $oldView = $eventObject->conf['view'];
-                                                               $eventObject->conf['view'] = 'single_ics';
-                                                               $extPath=t3lib_extMgm::extPath('cal');
-       
-                                                               $oldPath = 'EXT:cal/standard_template/event_model.tmpl';
-                                                               $oldPath = str_replace('EXT:cal/', $extPath, $oldPath);
-                                                               //$oldPath = str_replace(PATH_site, '', $oldPath);
-                                                               $eventObject->conf['view.']['event.']['phpicalendarEventTemplate'] = $oldPath;
-                                                               $eventObject->conf['view.']['event.']['eventModelTemplate'] = $oldPath;
-                                                               $oldBackPath = $GLOBALS['TSFE']->tmpl->getFileName_backPath;
-                                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = '';
-                                                               $fileInfo = t3lib_div::split_fileref($oldPath);
-                                                               $GLOBALS['TSFE']->tmpl->allowedPaths[] = $fileInfo['path'];
-                                               
-                                                               $viewObj = &tx_cal_registry::Registry('basic','viewcontroller');
-                                                               $masterArray = Array($eventObject);
-                                                               $drawnIcs = $viewObj->drawIcs($masterArray, '', false);
-       
-                                                               $table = 'tx_cal_event';
-                                                               $where = 'uid = '.$event['uid'];
-                                                               $eventData = Array('tx_caldav_data'=>$drawnIcs);
-                                                               if($event['tx_caldav_uid']==null || $event['tx_caldav_uid']==''){
-                                                                       $eventData['tx_caldav_uid'] = $tx_cal_api->modelObj->conf['view.']['ics.']['eventUidPrefix'].'_'.$event['calendar_id'].'_'.$event['uid'];
-                                                               }
-                                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
-                                               
-                                                               $table = 'tx_cal_calendar';
-                                                               $where = 'uid = '.$event['calendar_id'];
-                                                               $eventData = Array('tstamp'=>time());
-                                                               $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$eventData);
-       
-                                                               $GLOBALS['TSFE']->tmpl->getFileName_backPath = $oldBackPath;
-                                                               $eventObject->conf['view'] = $oldView;
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-                       
-                       $this->info = 'Done.';
-               }
-       }
-       
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/mod1/class.tx_cal_ics_generator.php']) {
-       require_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/mod1/class.tx_cal_ics_generator.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/mod1/clear.gif b/mod1/clear.gif
deleted file mode 100644 (file)
index 9ed1269..0000000
Binary files a/mod1/clear.gif and /dev/null differ
diff --git a/mod1/conf.php b/mod1/conf.php
deleted file mode 100644 (file)
index bde6c5e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-       // DO NOT REMOVE OR CHANGE THESE 3 LINES:
-#define('TYPO3_MOD_PATH', '../typo3conf/ext/cal/mod1/');
-#$BACK_PATH='../../../../typo3/';
-$MCONF["name"]="tools_calicsgenerator";
-
-       
-$MCONF["access"]="admin";
-#$MCONF["script"]="index.php";
-$MCONF["script"]="_DISPATCH";
-
-$MLANG["default"]["tabs_images"]["tab"] = "moduleicon.gif";
-$MLANG["default"]["ll_ref"]="LLL:EXT:caldav/mod1/locallang_mod.xml";
-?>
\ No newline at end of file
diff --git a/mod1/index.php b/mod1/index.php
deleted file mode 100644 (file)
index b77c67b..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-<?php
-/***************************************************************
-* Copyright notice
-*
-* (c) 2005 Mario Matzulla (mario(at)matzullas.de)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/** 
- * Module 'cal_recurrence_generator' for the 'cal' extension.
- *
- * @author     Mario Matzulla <mario(at)matzullas.de>
- */
-
-
-       // DEFAULT initialization of a module [BEGIN]
-#unset($MCONF);
-
-// include my own class file for database copying
-include_once('class.tx_cal_ics_generator.php');
-include_once(t3lib_extMgm::extPath('cal').'controller/class.tx_cal_functions.php');
-#require ('conf.php');
-#require ($BACK_PATH.'init.php');
-#require ($BACK_PATH.'template.php');
-
-$GLOBALS['LANG']->includeLLFile('EXT:caldav/mod1/locallang.xml');
-#require_once (PATH_t3lib.'class.t3lib_scbase.php');
-// include this to enable accessing the database via tce
-#require_once (PATH_t3lib.'class.t3lib_tcemain.php');
-#require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-#require_once (PATH_t3lib.'class.t3lib_extfilefunc.php');
-$BE_USER->modAccess($MCONF,1); // This checks permissions and exits if the users has no permission for entry.
-       // DEFAULT initialization of a module [END]
-
-class tx_cal_ics_generator_module1 extends t3lib_SCbase {
-       var $pageinfo;
-
-       /**
-        * 
-        */
-       function init() {
-               global $BE_USER,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
-               
-               parent::init();
-
-               /*
-               if (t3lib_div::_GP('clear_all_cache'))  {
-                       $this->include_once[]=PATH_t3lib.'class.t3lib_tcemain.php';
-               }
-               */
-       }
-
-       /**
-        * Adds items to the ->MOD_MENU array. Used for the function menu selector.
-        */
-       function menuConfig()   {
-               $this->MOD_MENU = Array (
-                       'function' => Array (
-                               '1' => $GLOBALS['LANG']->getLL('function1'),
-                               '2' => $GLOBALS['LANG']->getLL('function2'),
-                               '3' => $GLOBALS['LANG']->getLL('function3'),
-                       )
-               );
-               parent::menuConfig();
-       }
-
-               // If you chose 'web' as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
-       /**
-        * Main function of the module. Write the content to $this->content
-        */
-       function main() {
-               global $BE_USER,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
-               
-               // Access check!
-               // The page will show only if there is a valid page and if this page may be viewed by the user
-               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
-               $access = is_array($this->pageinfo) ? 1 : 0;
-               
-               if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))  {
-       
-                               // Draw the header.
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
-                       $this->doc->backPath = $BACK_PATH;
-                       $this->doc->form='<form action="" method="POST">';
-
-                               // JavaScript
-                       $this->doc->JScode = '
-                               <script language="javascript" type="text/javascript">
-                                       script_ended = 0;
-                                       function jumpToUrl(URL) {
-                                               document.location = URL;
-                                       }
-                               </script>
-                       ';
-                       $this->doc->postCode='
-                               <script language="javascript" type="text/javascript">
-                                       script_ended = 1;
-                                       if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
-                               </script>
-                       ';
-
-                       $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50);
-
-                       $this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('title'));
-                       $this->content.=$this->doc->header($GLOBALS['LANG']->getLL('title'));
-                       $this->content.=$this->doc->spacer(5);
-                       $this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));
-                       $this->content.=$this->doc->divider(5);
-
-                       
-                       // Render content:
-                       $this->moduleContent();
-
-                       
-                       // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
-                       }
-               
-                       $this->content.=$this->doc->spacer(10);
-               } else {
-                               // If no access or if ID == zero
-               
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
-                       $this->doc->backPath = $BACK_PATH;
-               
-                       $this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('title'));
-                       $this->content.=$this->doc->header($GLOBALS['LANG']->getLL('title'));
-                       $this->content.=$this->doc->spacer(5);
-                       $this->content.=$this->doc->spacer(10);
-               }
-       }
-
-       /**
-        * Prints out the module HTML
-        */
-       function printContent() {
-
-               $this->content.=$this->doc->endPage();
-               echo $this->content;
-       }
-       
-       /**
-        * Generates the module content
-        */
-       function moduleContent()        {
-               switch(intval($this->MOD_SETTINGS['function'])) {
-                       case 2:
-                               $postVarArray = t3lib_div::_POST();
-                               $pageIds = Array();
-                               foreach($postVarArray as $name => $value){
-                                       if($name == 'pageId'){
-                                               $pageIds[intval($value)] = intval($value);
-                                       }
-                               }
-                               
-                               if(!empty($pageIds)){
-                                       $content=$GLOBALS['LANG']->getLL('generateIcs').'<br/>';
-                                       $rgc = &tx_cal_functions::makeInstance('tx_cal_ics_generator',0);
-                                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('found'),$rgc->countEventsWithoutIcs(),0,1);
-                                       $this->content.=$GLOBALS['LANG']->getLL('toBeProcessed');
-                                       foreach($pageIds as $eventPage => $pluginPage){
-                                               $rgc->pageIDForPlugin = $pluginPage;
-                                               $this->content.=$this->doc->section('PID '.$eventPage.$GLOBALS['LANG']->getLL('generateIcs'),$rgc->generateIcs(),0,1);
-                                       }
-                               } else {
-                                       $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cal']);
-                                       $this->content.='<script type="text/javascript">'.$this->getJScode().'</script>';
-                                       
-                                       $pid = 0;
-                                       $selectFieldIds = Array();
-                                       $content.='<table><tbody>';
-                                       $content.='<tr><td>';
-                                       $content.='"'.$GLOBALS['LANG']->getLL('tableHeader2').' :';
-                                       $content.='</td><td>';
-                                       //$content.='<select id="tceforms-multiselect-'.$pid.'" style="width:250px;" name="pageId'.$pid.'_list" class="formField tceforms-multiselect" size="1"></select>';
-                                       //$content.='<a href="#" onclick="setFormValueOpenBrowser(\'db\',\'pageId'.$pid.'|||pages|\'); return false;"><img src="sysext/t3skin/icons/gfx/insert3.gif" alt="'.$GLOBALS['LANG']->getLL('browse').'" title="'.$GLOBALS['LANG']->getLL('browse').'" border="0" height="15" width="15"></a>';
-                                       $content.='<input type="text" value="" name="pageId">';
-                                       $content.='</td></tr>';
-                                       $selectFieldIds[] = 'pageId'.$pid; 
-                                       $content.='<tbody></table>';
-                                       //$content.='<input name="pageId_list" id="pageId" type="text" value="" size="5" maxlength="5"><br />';
-                                       $scontent.='<input type="submit" value="'.$GLOBALS['LANG']->getLL('submit').'" onclick="return markSelections();"/>';
-                                       
-                                       $selectFields = '';
-                                       foreach($selectFieldIds as $selectFieldId){
-                                               $selectFields .= ' var o'.$selectFieldId.' = document.getElementById("'.$selectFieldId.'");if(o'.$selectFieldId.'.options.length > 0){o'.$selectFieldId.'.options[0].selected = "selected";} else {notComplete = 1;}';
-                                       }
-                                       $content .= '<script type="text/javascript">function markSelections(){ var notComplete = 0;'.$selectFields.' if(notComplete == 1){alert("'.$GLOBALS['LANG']->getLL('notAllPagesAssigned').'");return false;}return true;}</script>';
-                                       
-                                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('selectPage'),$content,0,1);
-                                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('startIndexing'),$scontent,0,1);
-                               }
-                       break;
-                       case 3:
-                               $rgc = &tx_cal_functions::makeInstance('tx_cal_ics_generator',0);
-                               $this->content.=$this->doc->section('Check',$rgc->check(),0,1);
-                       break;
-                       default:
-                               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('notice_header'),$GLOBALS['LANG']->getLL('notice'),0,1);
-                               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('capabilities_header'),$GLOBALS['LANG']->getLL('capabilities'),0,1);
-                       break;
-               } 
-       }
-       
-       private function getJScode(){
-               $t3lib_TCEforms = t3lib_div::makeInstance("t3lib_TCEforms");
-               $t3lib_TCEforms->backPath = $GLOBALS["BACK_PATH"];
-               return $t3lib_TCEforms->dbFileCon(); 
-       }
-}
-
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/mod1/index.php'])      {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/caldav/mod1/index.php']);
-}
-
-
-// Make instance:
-$SOBE = t3lib_div::makeInstance('tx_cal_ics_generator_module1');
-$SOBE->init();
-
-// Include files?
-foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
-
-$SOBE->main();
-$SOBE->printContent();
-?>
\ No newline at end of file
diff --git a/mod1/locallang.xml b/mod1/locallang.xml
deleted file mode 100644 (file)
index b92b625..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description></description>
-        <type>module</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="title">Index generator for calendar base recurring events</label>
-            <label index="function1">Information</label>
-            <label index="function2">Generate</label>
-            <label index="function3">Check</label>
-            <label index="notice_header">Welcome</label>
-            <label index="notice">&lt;div align=center&gt;&lt;strong&gt;Notice header&lt;/strong&gt;&lt;/div&gt;&lt;BR&gt;Before you proceed, please read carefully:</label>
-            <label index="capabilities_header">Capabilities of this tool</label>
-            <label index="capabilities">This tool will create an index for all recurring tx_cal_event and tx_cal_exception_event instances.</label>
-            <label index="tableHeader1">Page/Folder containing events/exception events</label>
-            <label index="tableHeader2">Frontend Page with calendar plugin</label>
-            <label index="browse">Browse for records</label>
-            <label index="submit">Submit</label>
-            <label index="selectPage">Select the page where the typoscript of calendar base can be found. This should be a normal frontend page.</label>
-            <label index="indexStart">Enter the start time the index should start generating (YYYYMMDD)</label>
-            <label index="indexEnd">Enter the index ending time (YYYYMMDD)</label>
-            <label index="startIndexing">Click on submit to start indexing</label>
-            <label index="notAllPagesAssigned">You need to assign a frontend page to all found storage places in order to start indexing!</label>
-            <label index="result">Result: </label>
-            <label index="toBeIndexed"> -&gt; Events to be indexed: </label>
-            <label index="found">Found </label>
-            <label index="toBeProcessed"> to be processed.</label>
-            <label index="generateIcs">Generating ICS contents</label>
-        </languageKey>
-        <languageKey index="dk" type="array">
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-        <languageKey index="no" type="array">
-        </languageKey>
-        <languageKey index="it" type="array">
-        </languageKey>
-        <languageKey index="fr" type="array">
-        </languageKey>
-        <languageKey index="es" type="array">
-        </languageKey>
-        <languageKey index="nl" type="array">
-        </languageKey>
-        <languageKey index="cz" type="array">
-        </languageKey>
-        <languageKey index="pl" type="array">
-        </languageKey>
-        <languageKey index="si" type="array">
-        </languageKey>
-        <languageKey index="fi" type="array">
-        </languageKey>
-        <languageKey index="tr" type="array">
-        </languageKey>
-        <languageKey index="se" type="array">
-        </languageKey>
-        <languageKey index="pt" type="array">
-        </languageKey>
-        <languageKey index="ru" type="array">
-        </languageKey>
-        <languageKey index="ro" type="array">
-        </languageKey>
-        <languageKey index="ch" type="array">
-        </languageKey>
-        <languageKey index="sk" type="array">
-        </languageKey>
-        <languageKey index="lt" type="array">
-        </languageKey>
-        <languageKey index="is" type="array">
-        </languageKey>
-        <languageKey index="hr" type="array">
-        </languageKey>
-        <languageKey index="hu" type="array">
-        </languageKey>
-        <languageKey index="gl" type="array">
-        </languageKey>
-        <languageKey index="th" type="array">
-        </languageKey>
-        <languageKey index="gr" type="array">
-        </languageKey>
-        <languageKey index="hk" type="array">
-        </languageKey>
-        <languageKey index="eu" type="array">
-        </languageKey>
-        <languageKey index="bg" type="array">
-        </languageKey>
-        <languageKey index="br" type="array">
-        </languageKey>
-        <languageKey index="et" type="array">
-        </languageKey>
-        <languageKey index="ar" type="array">
-        </languageKey>
-        <languageKey index="he" type="array">
-        </languageKey>
-        <languageKey index="ua" type="array">
-        </languageKey>
-        <languageKey index="lv" type="array">
-        </languageKey>
-        <languageKey index="jp" type="array">
-        </languageKey>
-        <languageKey index="vn" type="array">
-        </languageKey>
-        <languageKey index="ca" type="array">
-        </languageKey>
-        <languageKey index="ba" type="array">
-        </languageKey>
-        <languageKey index="kr" type="array">
-        </languageKey>
-    </data>
-    <orig_hash type="array">
-        <languageKey index="default" type="array">
-            <label index="title" type="integer">160190671</label>
-            <label index="function1" type="integer">176340495</label>
-            <label index="function2" type="integer">53186973</label>
-            <label index="notice_header" type="integer">137500844</label>
-            <label index="notice" type="integer">244197590</label>
-            <label index="capabilities_header" type="integer">235312747</label>
-            <label index="capabilities" type="integer">265998735</label>
-            <label index="tableHeader1" type="integer">124841659</label>
-            <label index="tableHeader2" type="integer">250451894</label>
-            <label index="browse" type="integer">3203407</label>
-            <label index="submit" type="integer">172833558</label>
-            <label index="selectPage" type="integer">13186099</label>
-            <label index="indexStart" type="integer">92521741</label>
-            <label index="indexEnd" type="integer">132549580</label>
-            <label index="startIndexing" type="integer">182684290</label>
-            <label index="notAllPagesAssigned" type="integer">252237131</label>
-            <label index="result" type="integer">257132644</label>
-            <label index="toBeIndexed" type="integer">44755805</label>
-            <label index="droppingTable" type="integer">114304630</label>
-            <label index="indexing" type="integer">86103277</label>
-        </languageKey>
-        <languageKey index="dk" type="array">
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-        <languageKey index="no" type="array">
-        </languageKey>
-        <languageKey index="it" type="array">
-        </languageKey>
-        <languageKey index="fr" type="array">
-        </languageKey>
-        <languageKey index="es" type="array">
-        </languageKey>
-        <languageKey index="nl" type="array">
-        </languageKey>
-        <languageKey index="cz" type="array">
-        </languageKey>
-        <languageKey index="pl" type="array">
-        </languageKey>
-        <languageKey index="si" type="array">
-        </languageKey>
-        <languageKey index="fi" type="array">
-        </languageKey>
-        <languageKey index="tr" type="array">
-        </languageKey>
-        <languageKey index="se" type="array">
-        </languageKey>
-        <languageKey index="pt" type="array">
-        </languageKey>
-        <languageKey index="ru" type="array">
-        </languageKey>
-        <languageKey index="ro" type="array">
-        </languageKey>
-        <languageKey index="ch" type="array">
-        </languageKey>
-        <languageKey index="sk" type="array">
-        </languageKey>
-        <languageKey index="lt" type="array">
-        </languageKey>
-        <languageKey index="is" type="array">
-        </languageKey>
-        <languageKey index="hr" type="array">
-        </languageKey>
-        <languageKey index="hu" type="array">
-        </languageKey>
-        <languageKey index="gl" type="array">
-        </languageKey>
-        <languageKey index="th" type="array">
-        </languageKey>
-        <languageKey index="gr" type="array">
-        </languageKey>
-        <languageKey index="hk" type="array">
-        </languageKey>
-        <languageKey index="eu" type="array">
-        </languageKey>
-        <languageKey index="bg" type="array">
-        </languageKey>
-        <languageKey index="br" type="array">
-        </languageKey>
-        <languageKey index="et" type="array">
-        </languageKey>
-        <languageKey index="ar" type="array">
-        </languageKey>
-        <languageKey index="he" type="array">
-        </languageKey>
-        <languageKey index="ua" type="array">
-        </languageKey>
-        <languageKey index="lv" type="array">
-        </languageKey>
-        <languageKey index="jp" type="array">
-        </languageKey>
-        <languageKey index="vn" type="array">
-        </languageKey>
-        <languageKey index="ca" type="array">
-        </languageKey>
-        <languageKey index="ba" type="array">
-        </languageKey>
-        <languageKey index="kr" type="array">
-        </languageKey>
-    </orig_hash>
-    <orig_text type="array">
-        <languageKey index="default" type="array">
-        </languageKey>
-        <languageKey index="dk" type="array">
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-        <languageKey index="no" type="array">
-        </languageKey>
-        <languageKey index="it" type="array">
-        </languageKey>
-        <languageKey index="fr" type="array">
-        </languageKey>
-        <languageKey index="es" type="array">
-        </languageKey>
-        <languageKey index="nl" type="array">
-        </languageKey>
-        <languageKey index="cz" type="array">
-        </languageKey>
-        <languageKey index="pl" type="array">
-        </languageKey>
-        <languageKey index="si" type="array">
-        </languageKey>
-        <languageKey index="fi" type="array">
-        </languageKey>
-        <languageKey index="tr" type="array">
-        </languageKey>
-        <languageKey index="se" type="array">
-        </languageKey>
-        <languageKey index="pt" type="array">
-        </languageKey>
-        <languageKey index="ru" type="array">
-        </languageKey>
-        <languageKey index="ro" type="array">
-        </languageKey>
-        <languageKey index="ch" type="array">
-        </languageKey>
-        <languageKey index="sk" type="array">
-        </languageKey>
-        <languageKey index="lt" type="array">
-        </languageKey>
-        <languageKey index="is" type="array">
-        </languageKey>
-        <languageKey index="hr" type="array">
-        </languageKey>
-        <languageKey index="hu" type="array">
-        </languageKey>
-        <languageKey index="gl" type="array">
-        </languageKey>
-        <languageKey index="th" type="array">
-        </languageKey>
-        <languageKey index="gr" type="array">
-        </languageKey>
-        <languageKey index="hk" type="array">
-        </languageKey>
-        <languageKey index="eu" type="array">
-        </languageKey>
-        <languageKey index="bg" type="array">
-        </languageKey>
-        <languageKey index="br" type="array">
-        </languageKey>
-        <languageKey index="et" type="array">
-        </languageKey>
-        <languageKey index="ar" type="array">
-        </languageKey>
-        <languageKey index="he" type="array">
-        </languageKey>
-        <languageKey index="ua" type="array">
-        </languageKey>
-        <languageKey index="lv" type="array">
-        </languageKey>
-        <languageKey index="jp" type="array">
-        </languageKey>
-        <languageKey index="vn" type="array">
-        </languageKey>
-        <languageKey index="ca" type="array">
-        </languageKey>
-        <languageKey index="ba" type="array">
-        </languageKey>
-        <languageKey index="kr" type="array">
-        </languageKey>
-    </orig_text>
-</T3locallang>
\ No newline at end of file
diff --git a/mod1/locallang_mod.xml b/mod1/locallang_mod.xml
deleted file mode 100644 (file)
index 2a1a2b5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3locallang>
-    <meta type="array">
-        <description></description>
-        <type>module</type>
-        <csh_table></csh_table>
-        <labelContext type="array">
-        </labelContext>
-    </meta>
-    <data type="array">
-        <languageKey index="default" type="array">
-            <label index="mlang_tabs_tab">Cal ICS Generator</label>
-            <label index="mlang_labels_tabdescr">Generates ICS content for events</label>
-            <label index="mlang_labels_tablabel">Generates ICS content for events</label>
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-    </data>
-    <orig_hash type="array">
-        <languageKey index="default" type="array">
-            <label index="mlang_tabs_tab" type="integer">58326266</label>
-            <label index="mlang_labels_tabdescr" type="integer">143699304</label>
-            <label index="mlang_labels_tablabel" type="integer">143699304</label>
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-    </orig_hash>
-    <orig_text type="array">
-        <languageKey index="default" type="array">
-        </languageKey>
-        <languageKey index="de" type="array">
-        </languageKey>
-    </orig_text>
-</T3locallang>
\ No newline at end of file
diff --git a/mod1/moduleicon.gif b/mod1/moduleicon.gif
deleted file mode 100644 (file)
index 8cd9b2c..0000000
Binary files a/mod1/moduleicon.gif and /dev/null differ