[TASK] Use booleans where currently 1/0 are used

Releases: master
Resolves: #83023
Change-Id: I9fe436f94a1223020b5fd0c308fa5bdb1b81ec39
Reviewed-on: https://review.typo3.org/54671
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
This commit is contained in:
Stefan Neufeind 2017-11-17 10:26:42 +01:00 committed by Markus Klein
parent c448bd9d51
commit 721e2a4455

View file

@ -215,14 +215,14 @@ class FrontendEditPanel
$iconImg = '<span title="' . htmlspecialchars($iconTitle, ENT_COMPAT, 'UTF-8', false) . '" style="' . ($conf['styleAttribute'] ? htmlspecialchars($conf['styleAttribute']) : '') . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render('inline')
. '</span>';
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
$noView = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
$url = BackendUtility::getModuleUrl(
'record_edit',
[
'edit[' . $table . '][' . $editUid . ']' => 'edit',
'columnsOnly' => $fieldList,
'noView' => $nV,
'noView' => $noView,
'feEdit' => 1
]
) . $addUrlParamStr;
@ -257,10 +257,10 @@ class FrontendEditPanel
*/
protected function editPanelLinkWrap($string, $formName, $cmd, $currentRecord = '', $confirm = '', $nPid = '')
{
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
$noView = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
if ($cmd === 'edit') {
$rParts = explode(':', $currentRecord);
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $nV, 'feEdit' => 1]), $currentRecord);
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $noView, 'feEdit' => 1]), $currentRecord);
} elseif ($cmd === 'new') {
$rParts = explode(':', $currentRecord);
if ($rParts[0] === 'pages') {
@ -269,7 +269,7 @@ class FrontendEditPanel
if (!(int)$nPid) {
$nPid = MathUtility::canBeInterpretedAsInteger($rParts[1]) ? -$rParts[1] : $this->frontendController->id;
}
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $nPid . ']' => 'new', 'noView' => $nV]), $currentRecord);
$out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $nPid . ']' => 'new', 'noView' => $noView]), $currentRecord);
}
} else {
if ($confirm && $this->backendUser->jsConfirmation(JsConfirmation::FE_EDIT)) {