From ec9a35e67b3ddd23722e3055c7e62769e356b61f Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski <t.motylewski@gmail.com> Date: Thu, 17 Aug 2017 17:12:41 +0200 Subject: [PATCH] [BUGFIX] Correct type of argument passed to BackendUtility::viewOnClick Third argument passed to BackendUtility::viewOnClick should be an array or null. Resolves: #82124 Releases: master, 8.7 Change-Id: I330d2fcbbc30d9f22f4758ad84599755a1d707ad Reviewed-on: https://review.typo3.org/53721 Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> --- .../info/Classes/Controller/TranslationStatusController.php | 4 ++-- .../recordlist/Classes/RecordList/DatabaseRecordList.php | 2 +- typo3/sysext/workspaces/Classes/Service/WorkspaceService.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/typo3/sysext/info/Classes/Controller/TranslationStatusController.php b/typo3/sysext/info/Classes/Controller/TranslationStatusController.php index 02e8c525d20f..4ad82f2cef3d 100644 --- a/typo3/sysext/info/Classes/Controller/TranslationStatusController.php +++ b/typo3/sysext/info/Classes/Controller/TranslationStatusController.php @@ -153,7 +153,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc // DEFAULT language: // "View page" link is created: $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick( - $data['row']['uid'], '', '', '', '', '&L=###LANG_UID###') + $data['row']['uid'], '', null, '', '', '&L=###LANG_UID###') ) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' . $this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>'; $status = GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? 'danger' : 'success'; @@ -167,7 +167,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI') ]); $info = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick( - $data['row']['uid'], '', '', '', '', '') + $data['row']['uid'], '', null, '', '', '') ) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' . $this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL)->render() . '</a>'; $info .= '<a href="' . htmlspecialchars($editUrl) diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php index 2ccbace5e2e4..a4763e0d6fb9 100644 --- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php @@ -1467,7 +1467,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList BackendUtility::viewOnClick( ($table === 'tt_content' ? $this->id : $row['uid']), '', - '', + null, ($table === 'tt_content' ? '#c' . $row['uid'] : '') ) ) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">'; diff --git a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php index 279bb5467416..c8f62404312a 100644 --- a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php +++ b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php @@ -769,7 +769,7 @@ class WorkspaceService implements SingletonInterface // Directly use determined direct page id if ($table === 'pages_language_overlay' || $table === 'tt_content') { - $viewUrl = BackendUtility::viewOnClick($previewPageId, '', '', '', '', $additionalParameters); + $viewUrl = BackendUtility::viewOnClick($previewPageId, '', null, '', '', $additionalParameters); // Analyze Page TSconfig options.workspaces.previewPageId } elseif (!empty($pageTsConfig['options.']['workspaces.']['previewPageId.'][$table]) || !empty($pageTsConfig['options.']['workspaces.']['previewPageId'])) { if (!empty($pageTsConfig['options.']['workspaces.']['previewPageId.'][$table])) { @@ -784,7 +784,7 @@ class WorkspaceService implements SingletonInterface } else { $previewPageId = (int)$previewConfiguration; } - $viewUrl = BackendUtility::viewOnClick($previewPageId, '', '', '', '', $additionalParameters); + $viewUrl = BackendUtility::viewOnClick($previewPageId, '', null, '', '', $additionalParameters); // Call user function to render the single record view } elseif (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['viewSingleRecord'])) { $_params = [ -- GitLab