Skip to content

Commit 04ce28f

Browse files
committed
[FEATURE] Make necessary adjustments for TYPO3 v10 (TehTux#20)
1 parent 5201a9f commit 04ce28f

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

Classes/Validation/Validator/Powermail.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Powermail extends \In2code\Powermail\Domain\Validator\SpamShield\AbstractM
1010
/**
1111
* @return bool true if spam recognized
1212
*/
13-
public function spamCheck()
13+
public function spamCheck(): bool
1414
{
1515
# Skip captcha check on confirmation page
1616
if (

Classes/ViewHelpers/ReCaptchaViewHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
66
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
77

8-
class ReCaptchaViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
8+
class ReCaptchaViewHelper extends \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
99
{
1010
/**
1111
* As this ViewHelper renders HTML, the output must not be escaped.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
defined('TYPO3_MODE') or die();
3+
4+
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
5+
'jh_captcha',
6+
'Configuration/TypoScript',
7+
'Google reCAPTCHA (v2/v3)'
8+
);

Configuration/Yaml/ReCaptcha/BaseSetup.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ TYPO3:
1717
10: 'TYPO3.CMS.Form.mixins.formElementMixins.JhCaptchaRecaptchaMixin'
1818
renderingOptions:
1919
_isHiddenFormElement: true
20+
enabled: false
2021
validatorsDefinition:
2122
JhCaptchaRecaptcha:
2223
implementationClassName: 'Haffner\JhCaptcha\Validation\Validator\ReCaptchaValidator'

ext_localconf.php

+5
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@
1818
\TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
1919
['name' => 'google']
2020
);
21+
22+
# EXT:powermail
23+
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
24+
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:jh_captcha/Configuration/PageTS/Powermail.typoscript">'
25+
);

ext_tables.php

-16
This file was deleted.

0 commit comments

Comments
 (0)