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