Commit 9f608f42 authored by Administrator's avatar Administrator

PHP and TYPO3 update; use typo3-secure-web

parent be78bd80
......@@ -7,7 +7,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
/***************************************************************
* Copyright notice
*
* (c) 2017 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
* (c) 2020 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
*
* All rights reserved
*
......
......@@ -4,7 +4,7 @@ namespace MediaEssenz\MeGoogleCalendar\Domain\Model;
/***************************************************************
* Copyright notice
*
* (c) 2017 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
* (c) 2020 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
*
* All rights reserved
*
......
......@@ -6,7 +6,7 @@ use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
/***************************************************************
* Copyright notice
*
* (c) 2018 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
* (c) 2020 Alexander Grein <alexander.grein@gmail.com>, MEDIA::ESSENZ
*
* All rights reserved
*
......
<?php
/**
* Configuration Utility.
*/
declare(strict_types=1);
namespace MediaEssenz\MeGoogleCalendar\Utility;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use function unserialize;
/**
* Configuration Utility.
*/
class ConfigurationUtility
{
/**
* Configuration cache.
*
* @var array
*/
protected static $configuration;
/**
* Configuration cache.
*
* @var array
*/
protected static $configuration;
/**
* Get the given configuration value.
*
* @param string $name
*
* @return mixed
*/
public static function get($name)
{
self::loadConfiguration();
/**
* Get the given configuration value.
*
* @param string $name
*
* @return string
* @throws \TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException
* @throws \TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException
*/
public static function get($name): string
{
self::loadConfiguration();
return isset(self::$configuration[$name]) ? self::$configuration[$name] : '';
}
return isset(self::$configuration[$name]) ? self::$configuration[$name] : null;
/**
* Load the current configuration.
* @return void
* @throws \TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException
* @throws \TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException
*/
protected static function loadConfiguration(): void
{
if (null === self::$configuration) {
if (self::isTypo3OlderThen9()) {
self::$configuration = (array)unserialize((string)$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['me_google_calendar']);
} else {
self::$configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('me_google_calendar');
}
}
}
/**
* Load the current configuration.
*/
protected static function loadConfiguration()
{
if (null === self::$configuration) {
self::$configuration = (array) \unserialize((string) $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['me_google_calendar']);
}
}
/**
* Check if TYPO3 is older than 9
*
* @return bool
*/
public static function isTypo3OlderThen9(): bool
{
return VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 9000000;
}
}
......@@ -4,12 +4,12 @@ namespace MediaEssenz\MeGoogleCalendar\Utility;
use DateTime;
use DateTimeZone;
use Exception;
use \TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/***************************************************************
* Copyright notice
*
* (c) 2017 Alexander Grein
* (c) 2020 Alexander Grein
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......@@ -29,11 +29,6 @@ use \TYPO3\CMS\Core\Utility\GeneralUtility;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Last Modified:
* Date: 17.10.17
* Time: 22:27
*/
class EidGetIcs
{
/**
......@@ -89,7 +84,7 @@ DTSTAMP:' . date('Ymd\THis\Z') . '
DTSTART:' . $dtstartDate . ($allDay ? '' : 'T' . $dtstartTime . 'Z') . '
DTEND:' . $dtendDate . ($allDay ? '' : 'T' . $dtendTime . 'Z') . '
' . (GeneralUtility::_GP('description') !== 'undefined' ? 'DESCRIPTION:' . trim(htmlspecialchars(strip_tags(str_replace('<br>', '\\n', GeneralUtility::_GP('description'))))) : '') . '
' . (GeneralUtility::_GP('location') !== 'undefined' ? 'LOCATION:' . htmlspecialchars(GeneralUtility::_GP('location')) : '') . '
' . (GeneralUtility::_GP('location') !== 'undefined' ? 'LOCATION:' . htmlspecialchars(GeneralUtility::_GP('location')) : '') . '
END:VEVENT
END:VCALENDAR';
......
<?php
namespace MediaEssenz\MeGoogleCalendar\ViewHelpers;
class FormatHeaderValueViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
class FormatHeaderValueViewHelper extends \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
{
/**
* @return string
......
<?php
namespace MediaEssenz\MeGoogleCalendar\ViewHelpers;
class JsBoolViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
class JsBoolViewHelper extends \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
{
/**
* @return string
......
......@@ -171,3 +171,6 @@ ChangeLog
- v.4.8.3: Fix wrong version number in manual
- v.4.8.4: Fix wrong extension key in composer.json
- v.4.9.0: Fix wrong path to loading gif; Accessibility optimizations; Small changes in markup of modal to
better work with bootstrap 4; Make code TYPO3 10 compatible, but not really tested yet;
......@@ -39,8 +39,8 @@
'<div class="modal-dialog" role="document">' +
'<div class="modal-content">' +
'<div class="modal-header">' +
'<h4 class="modal-title" id="meGoogleCalendarModalLabel">' + event.title + '</h4>' +
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>' +
'<h4 class="modal-title" id="myModalLabel">' + event.title + '</h4>' +
'</div>' +
'<div class="modal-body">' +
eventDescription +
......
......@@ -11,7 +11,19 @@
<div id="{contentKey}_overlay" class="fc-overlay ui-widget-overlay" style="display:none"></div>
<div id="{contentKey}" class="fc-calendar"></div>
<div id="{contentKey}_dialog" class="fc-dialog" style="display:none"></div>
<div id="{contentKey}_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div>
<div id="{contentKey}_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="meGoogleCalendarModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="meGoogleCalendarModalLabel">Event Title</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
Event Description
</div>
</div>
</div>
</div>
</f:section>
</html>
\ No newline at end of file
</html>
......@@ -1313,7 +1313,7 @@ be a descendant of the grid when it is being dragged.
top: 0;
bottom: 0;
z-index: 1001;
background: image-url("big-f0f0f0.gif") no-repeat 50% 50%;
background: url("../Images/big-f0f0f0.gif") no-repeat 50% 50%;
font-size: 0.9em; }
.fc-overlay {
......@@ -1348,11 +1348,7 @@ be a descendant of the grid when it is being dragged.
font-size: 0.8em; }
.fc-icalbutton {
margin-right: 10px !important;
margin-bottom: 10px; }
.btn.fc-icalbutton {
margin-bottom: 0; }
margin-right: 10px !important; }
.fc-event.fc-red,
.fc-agenda .fc-event.fc-red .fc-event-time,
......
This diff is collapsed.
......@@ -24,7 +24,7 @@
top: 0;
bottom: 0;
z-index: 1001;
background: image-url('big-f0f0f0.gif') no-repeat 50% 50%;
background: url('../Images/big-f0f0f0.gif') no-repeat 50% 50%;
font-size: 0.9em;
}
......@@ -68,10 +68,6 @@
.fc-icalbutton {
margin-right: 10px !important;
margin-bottom:10px;
}
.btn.fc-icalbutton {
margin-bottom: 0;
}
.fc-event.fc-red,
......
......@@ -21,9 +21,9 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0.0",
"typo3/cms-core": "~8.7.0||~9.5.0||dev-master",
"typo3/cms-frontend": "~8.7.0||~9.5.0||dev-master",
"typo3/cms-extbase": "~8.7.0||~9.5.0||dev-master"
"typo3/cms-core": ">=8.7.0 <11.0.0",
"typo3/cms-frontend": ">=8.7.0 <11.0.0",
"typo3/cms-extbase": ">=8.7.0 <11.0.0"
},
"autoload": {
"psr-4": {
......@@ -39,7 +39,7 @@
"extension-key": "me_google_calendar"
},
"branch-alias": {
"dev-master": "4.8.x-dev"
"dev-master": "4.9.x-dev"
}
}
}
......@@ -14,7 +14,7 @@ $EM_CONF[$_EXTKEY] = [
'title' => 'Google Calendar',
'description' => 'Includes the jQuery Plugin FullCalendar, which generates a skinable calendar with different views (month, week, day, week list, day list etc.) from Google Calendar XML Feed(s) - now with extbase/fluid.',
'category' => 'plugin',
'version' => '4.8.4',
'version' => '4.9.0',
'state' => 'stable',
'author' => 'Alexander Grein',
'author_email' => 'alexander.grein@gmail.com',
......@@ -23,7 +23,7 @@ $EM_CONF[$_EXTKEY] = [
[
'depends' =>
[
'typo3' => '8.7.8-9.5.99',
'typo3' => '8.7.8-10.4.99',
],
'conflicts' =>
[],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment