[TASK] Use TSFE->isBackendUserLoggedIn() instead of public variable 75/55575/2
authorBenni Mack <benni@typo3.org>
Tue, 6 Feb 2018 12:01:35 +0000 (13:01 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 6 Feb 2018 20:46:46 +0000 (21:46 +0100)
The public method TSFE->isBackendUserLoggedIn() instead of
TSFE->beUserLogin (public property).

Resolves: #83785
Releases: master
Change-Id: I1e54b7365b3b6810b606e93b0f888a7790492014
Reviewed-on: https://review.typo3.org/55575
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/Error/ProductionExceptionHandler.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/EditPanelContentObject.php
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/workspaces/Classes/Hook/PreviewHook.php

index 3b3522d..61a3b72 100644 (file)
@@ -100,7 +100,7 @@ class ProductionExceptionHandler extends AbstractExceptionHandler
         }
         // Only show errors in FE, if a BE user is authenticated
         if (TYPO3_MODE === 'FE') {
-            return $GLOBALS['TSFE']->beUserLogin;
+            return $GLOBALS['TSFE']->isBackendUserLoggedIn();
         }
         return true;
     }
index 9a55bd2..e0ba50c 100644 (file)
@@ -2821,7 +2821,7 @@ class ContentObjectRenderer
      */
     public function stdWrap_editIcons($content = '', $conf = [])
     {
-        if ($this->getTypoScriptFrontendController()->beUserLogin && $conf['editIcons']) {
+        if ($this->getTypoScriptFrontendController()->isBackendUserLoggedIn() && $conf['editIcons']) {
             if (!is_array($conf['editIcons.'])) {
                 $conf['editIcons.'] = [];
             }
@@ -2840,7 +2840,7 @@ class ContentObjectRenderer
      */
     public function stdWrap_editPanel($content = '', $conf = [])
     {
-        if ($this->getTypoScriptFrontendController()->beUserLogin) {
+        if ($this->getTypoScriptFrontendController()->isBackendUserLoggedIn()) {
             $content = $this->editPanel($content, $conf['editPanel.']);
         }
         return $content;
@@ -7067,7 +7067,7 @@ class ContentObjectRenderer
      */
     public function editPanel($content, $conf, $currentRecord = '', $dataArr = [])
     {
-        if ($this->getTypoScriptFrontendController()->beUserLogin && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) {
+        if ($this->getTypoScriptFrontendController()->isBackendUserLoggedIn() && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) {
             if (!$currentRecord) {
                 $currentRecord = $this->currentRecord;
             }
@@ -7094,7 +7094,7 @@ class ContentObjectRenderer
      */
     public function editIcons($content, $params, array $conf = [], $currentRecord = '', $dataArr = [], $addUrlParamStr = '')
     {
-        if ($this->getTypoScriptFrontendController()->beUserLogin && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) {
+        if ($this->getTypoScriptFrontendController()->isBackendUserLoggedIn() && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) {
             if (!$currentRecord) {
                 $currentRecord = $this->currentRecord;
             }
index b3cddb1..8001ce7 100644 (file)
@@ -28,7 +28,7 @@ class EditPanelContentObject extends AbstractContentObject
     public function render($conf = [])
     {
         $theValue = '';
-        if ($GLOBALS['TSFE']->beUserLogin) {
+        if ($GLOBALS['TSFE']->isBackendUserLoggedIn()) {
             $theValue = $this->cObj->editPanel($theValue, $conf);
         }
         if (isset($conf['stdWrap.'])) {
index b8fbb08..0c7ad33 100644 (file)
@@ -275,7 +275,7 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
             // in (admin panel might show...) or if debug mode is turned on, we disable it!
             if (
                 (!isset($this->controller->config['config']['enableContentLengthHeader']) || $this->controller->config['config']['enableContentLengthHeader'])
-                && !$this->controller->beUserLogin && !$GLOBALS['TYPO3_CONF_VARS']['FE']['debug']
+                && !$this->controller->isBackendUserLoggedIn() && !$GLOBALS['TYPO3_CONF_VARS']['FE']['debug']
                 && !$this->controller->config['config']['debug'] && !$this->controller->doWorkspacePreview()
             ) {
                 header('Content-Length: ' . strlen($this->controller->content));
index 887e9f9..efa083c 100644 (file)
@@ -864,7 +864,7 @@ class AbstractPlugin
             $row = $this->internal['currentRow'];
             $tablename = $this->internal['currentTable'];
         }
-        if ($this->frontendController->beUserLogin) {
+        if ($this->frontendController->isBackendUserLoggedIn()) {
             // Create local cObj if not set:
             if (!is_object($this->pi_EPtemp_cObj)) {
                 $this->pi_EPtemp_cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
@@ -900,7 +900,7 @@ class AbstractPlugin
      */
     public function pi_getEditIcon($content, $fields, $title = '', $row = [], $tablename = '', $oConf = [])
     {
-        if ($this->frontendController->beUserLogin) {
+        if ($this->frontendController->isBackendUserLoggedIn()) {
             if (!$row || !$tablename) {
                 $row = $this->internal['currentRow'];
                 $tablename = $this->internal['currentTable'];
index 84a7d1c..d367037 100644 (file)
@@ -163,7 +163,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
             unset($tempBackendUser);
             $params['BE_USER'] = $BE_USER;
         }
-        if ($pObj->beUserLogin
+        if ($pObj->isBackendUserLoggedIn()
             && is_object($params['BE_USER'])
             && MathUtility::canBeInterpretedAsInteger($workspaceUid)
         ) {