Commit 97652c00 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[BUGFIX] ensure compatibility with both TYPO3 7 and TYPO3 8

parent 9ddc19e9
......@@ -26,6 +26,7 @@ namespace SGalinski\Lfeditor\ViewHelpers;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper;
/**
......@@ -38,9 +39,14 @@ class ExtendedIfViewHelper extends AbstractConditionViewHelper {
*/
public function initializeArguments() {
parent::initializeArguments();
$this->registerArgument(
'condition', 'boolean', 'Condition expression conforming to Fluid boolean rules', FALSE, FALSE
);
$version = VersionNumberUtility::getNumericTypo3Version();
// ensure compatibility with both TYPO3 versions >= and < 8
if (VersionNumberUtility::convertVersionNumberToInteger($version) < 8000000) {
$this->registerArgument(
'condition', 'boolean', 'Condition expression conforming to Fluid boolean rules', FALSE, FALSE
);
}
$this->registerArgument(
'or', 'boolean', 'Condition expression conforming to Fluid boolean rules', FALSE, FALSE
);
......
......@@ -4,7 +4,7 @@
"description": "Language File Editor",
"homepage": "https://www.sgalinski.de",
"license": ["GPL-2.0+"],
"version": "4.0.1",
"version": "4.0.2",
"support": {
"issues": "https://forge.typo3.org/projects/extension-lfeditor",
"source": "https://gitlab.sgalinski.de/typo3/lfeditor/"
......
......@@ -18,7 +18,7 @@ Following functions are implemented in this module:
* Meta information handling
* Backups, recovering and diff view',
'category' => 'module',
'version' => '4.0.1',
'version' => '4.0.2',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
......
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