Commit 2f16ad1f authored by Oliver Hader's avatar Oliver Hader Committed by Richard Haeser
Browse files

[BUGFIX] Avoid double CSH wraps in linkvalidator tasks settings

Labels in linkvalidator's additional field settings for the schedule
are actually invoking `BackendUtility::wrapInHelp` twice - first time
in `ValidatorTaskAdditionalFieldProvider` and second time when actually
rendering with `f:be.labels.csh` view-helper.

Resolves: #92964
Releases: master, 10.4, 9.5
Change-Id: I8dc5baca7289604a150e2d80258fb21ebab9f59e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67593

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
parent a734dcb6
......@@ -114,7 +114,6 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
. '">';
$lang = $this->getLanguageService();
$label = $lang->sL($this->languageFile . ':tasks.validate.page');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$pageTitle = '';
if (!empty($taskInfo['page'])) {
$pageTitle = $this->getPageTitle((int)$taskInfo['page']);
......@@ -123,6 +122,8 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
'browser' => 'page',
'pageTitle' => $pageTitle,
'code' => $fieldCode,
'cshTable' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
// input for depth
......@@ -144,9 +145,10 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
}
$fieldCode .= '</select>';
$label = $lang->sL($this->languageFile . ':tasks.validate.depth');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$additionalFields[$fieldId] = [
'code' => $fieldCode,
'cshKey' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
$fieldId = 'task_configuration';
......@@ -156,9 +158,10 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
. htmlspecialchars($taskInfo['configuration'])
. '</textarea>';
$label = $lang->sL($this->languageFile . ':tasks.validate.conf');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$additionalFields[$fieldId] = [
'code' => $fieldCode,
'cshKey' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
$fieldId = 'task_email';
......@@ -168,9 +171,10 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
. htmlspecialchars($taskInfo['email'])
. '</textarea>';
$label = $lang->sL($this->languageFile . ':tasks.validate.email');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$additionalFields[$fieldId] = [
'code' => $fieldCode,
'cshKey' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
$fieldId = 'task_emailOnBrokenLinkOnly';
......@@ -179,9 +183,10 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
. (htmlspecialchars($taskInfo['emailOnBrokenLinkOnly']) ? 'checked="checked"' : '')
. '></label></div>';
$label = $lang->sL($this->languageFile . ':tasks.validate.emailOnBrokenLinkOnly');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$additionalFields[$fieldId] = [
'code' => $fieldCode,
'cshKey' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
$fieldId = 'task_emailTemplateFile';
......@@ -192,9 +197,10 @@ class ValidatorTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvid
. htmlspecialchars($taskInfo['emailTemplateFile'])
. '">';
$label = $lang->sL($this->languageFile . ':tasks.validate.emailTemplateFile');
$label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
$additionalFields[$fieldId] = [
'code' => $fieldCode,
'cshKey' => 'linkvalidator',
'cshLabel' => $fieldId,
'label' => $label
];
return $additionalFields;
......
......@@ -48,16 +48,16 @@
<trans-unit id="task_email.description" resname="task_email.description">
<source>Email address to which an email report is sent.</source>
</trans-unit>
<trans-unit id="task_emailonbrokenlinkonly.alttitle" resname="task_emailonbrokenlinkonly.alttitle">
<trans-unit id="task_emailOnBrokenLinkOnly.alttitle" resname="task_emailOnBrokenLinkOnly.alttitle">
<source>Mailing option</source>
</trans-unit>
<trans-unit id="task_emailonbrokenlinkonly.description" resname="task_emailonbrokenlinkonly.description">
<trans-unit id="task_emailOnBrokenLinkOnly.description" resname="task_emailOnBrokenLinkOnly.description">
<source>Only send an email, if new broken links were found.</source>
</trans-unit>
<trans-unit id="task_emailfile.alttitle" resname="task_emailfile.alttitle">
<trans-unit id="task_emailTemplateFile.alttitle" resname="task_emailTemplateFile.alttitle">
<source>Email template file</source>
</trans-unit>
<trans-unit id="task_emailfile.description" resname="task_emailfile.description">
<trans-unit id="task_emailTemplateFile.description" resname="task_emailTemplateFile.description">
<source>Define a template to be used for the email.</source>
</trans-unit>
</body>
......
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