Skip to content

Commit

Permalink
#4 Raise compatibility to PHP 7.1
Browse files Browse the repository at this point in the history
It is important that all instances of this extension where they are
included as a content element have to be re-created.
This ist due to caching of TYPO3 which prevents changes in flexform
being updated.
  • Loading branch information
thucke committed Nov 18, 2017
1 parent 144c7e9 commit 66a3240
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 106 deletions.
8 changes: 3 additions & 5 deletions Classes/Controller/TimezonesController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
namespace Thucke\Timezones\Controller;


/***************************************************************
* Copyright notice
Expand Down Expand Up @@ -82,15 +81,14 @@ public function injectExtensionHelperService( \Thucke\Timezones\Service\Extensio
public function initializeAction() {
//instantiate the logger
$this->logger = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('Thucke\\Timezones\\Service\\ExtensionHelperService')->getLogger(__CLASS__);
$this->logger->log( \TYPO3\CMS\Core\Log\LogLevel::DEBUG, 'Entry point', array());
$this->logger->log( \TYPO3\CMS\Core\Log\LogLevel::DEBUG, 'Entry initializeAction', array());

$this->checkIntlModule();

$this->prefixId = strtolower('tx_' . $this->request->getControllerExtensionName(). '_' . $this->request->getPluginName());
$this->cookieLifetime = time()+60*60*24*365;
$this->timezoneService->setCurrentTimezone($this->cookieService->getCookie($this->prefixId));

//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->settings,get_class($this).' settings');
$this->logger->log( \TYPO3\CMS\Core\Log\LogLevel::DEBUG, 'Exit initializeAction', array());
}


Expand Down Expand Up @@ -159,7 +157,7 @@ public function selectAction() {
* @ignorevalidation $timezone
*/
public function tzsetAction($timezone = null) {
$this->logger->log( \TYPO3\CMS\Core\Log\LogLevel::DEBUG, 'Entry tzsetAction', array());
$this->logger->log( \TYPO3\CMS\Core\Log\LogLevel::DEBUG, 'Entry tzsetAction', array('Timezone' => $timezone));

$this->timezoneService->setCurrentTimezone($timezone);
$timezone = $this->timezoneService->getCurrentTimezone()->getName();
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/ExtensionHelperService.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ExtensionHelperService extends \Thucke\Timezones\Service\AbstractExtension
* @return void
*/
public function getLogger( $name ) {
return $this->loggingService->getLogger(__CLASS__);
return $this->loggingService->getLogger($name);
}
}
?>
182 changes: 91 additions & 91 deletions Configuration/Flexforms/flexform_pi1.xml
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
<T3DataStructure>
<meta>
<langDisable>0</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.sheet_general</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions</label>
<config>
<type>select</type>
<items>
<numIndex index="0">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_1</numIndex>
<numIndex index="1">Timezones->index</numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_2</numIndex>
<numIndex index="1">Timezones->show</numIndex>
</numIndex>
<numIndex index="2">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_3</numIndex>
<numIndex index="1">Timezones->select</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</switchableControllerActions>
</el>
</ROOT>
</sDEF>
<sPaths>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.sheet_paths</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<view.templateRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_templateRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.templateRootPath>
<view.partialRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_partialRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.partialRootPath>
<view.layoutRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_layoutRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.layoutRootPath>
</el>
</ROOT>
</sPaths>
</sheets>
</T3DataStructure>
<T3DataStructure>
<meta>
<langDisable>0</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.sheet_general</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions</label>
<config>
<type>select</type>
<items>
<numIndex index="0">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_1</numIndex>
<numIndex index="1">Timezones->index;Timezones->show;Timezones->select;Timezones->tzset</numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_2</numIndex>
<numIndex index="1">Timezones->show;Timezones->index;Timezones->select;Timezones->tzset</numIndex>
</numIndex>
<numIndex index="2">
<numIndex index="0">LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.general_actions_3</numIndex>
<numIndex index="1">Timezones->select;Timezones->show;Timezones->index;Timezones->tzset</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</switchableControllerActions>
</el>
</ROOT>
</sDEF>
<sPaths>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.sheet_paths</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<view.templateRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_templateRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.templateRootPath>
<view.partialRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_partialRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.partialRootPath>
<view.layoutRootPath>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:timezones/Resources/Private/Language/locallang.xlf:flexform.paths_layoutRootPath</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
<max_size>1</max_size>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:180px</selectedListStyle>
</config>
</TCEforms>
</view.layoutRootPath>
</el>
</ROOT>
</sPaths>
</sheets>
</T3DataStructure>
2 changes: 1 addition & 1 deletion Configuration/TypoScript/setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugin.tx_timezones {
extensionName = Timezones
vendorName = Thucke
controller = Timezones
mvc.callDefaultActionIfActionCantBeResolved = 1
mvc.callDefaultActionIfActionCantBeResolved = 0
switchableControllerActions {
Timezones {
1 = index
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'title' => 'Timezones',
'description' => 'Manages timezones and datetime conversion in your website',
'category' => 'plugin',
'version' => '2.0.2',
'version' => '2.0.3',
'state' => 'beta',
'uploadfolder' => false,
'createDirs' => '',
Expand All @@ -22,7 +22,7 @@
'author_company' => '',
'constraints' => array(
'depends' => array(
'php' => '5.5.0-7.0.99',
'php' => '5.5.0-7.1.99',
'typo3' => '6.2.15-8.7.99',
),
'conflicts' => array(
Expand Down
6 changes: 0 additions & 6 deletions ext_tables.sql

This file was deleted.

0 comments on commit 66a3240

Please sign in to comment.