From 98e65abe0f02ac4c2ded2ac21f47a32b88e9a592 Mon Sep 17 00:00:00 2001 From: Andreas Fernandez Date: Mon, 2 Mar 2015 14:19:51 +0100 Subject: [PATCH] [TASK] Use constants instead of raw bitmask values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The used bitmasks of JsConfirmation and Permission are put into "enums" and their representing constants are used instead of the raw bitmask values. Resolves: #65455 Releases: master Change-Id: I1910bb960b69836ea29c16c91d730ac74c22f929 Reviewed-on: http://review.typo3.org/37455 Reviewed-by: Nicole Cordes Tested-by: Nicole Cordes Reviewed-by: Mathias Brodala Reviewed-by: Stefan Neufeind Reviewed-by: Frank Nägler Tested-by: Frank Nägler --- Classes/FrontendEditPanel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index e631e9a..1be54e7 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Backend\FrontendBackendUserAuthentication; use TYPO3\CMS\Core\Database\DatabaseConnection; +use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; @@ -252,7 +253,7 @@ class FrontendEditPanel { $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'alt_doc.php?edit[' . $rParts[0] . '][' . $nPid . ']=new&noView=' . $nV, $currentRecord); } } else { - if ($confirm && $this->backendUser->jsConfirmation(8)) { + if ($confirm && $this->backendUser->jsConfirmation(JsConfirmation::FE_EDIT)) { // Gets htmlspecialchared later $cf1 = 'if (confirm(' . GeneralUtility::quoteJSvalue($confirm, TRUE) . ')) {'; $cf2 = '}';