[TASK] Remove a series of SOBE assignments 18/58018/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 23 Aug 2018 23:17:23 +0000 (01:17 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 24 Aug 2018 07:03:13 +0000 (09:03 +0200)
The infamous $GLOBALS['SOBE'] object is still used at various
places is the core. This "talk to the hand" object registered
as runtime global to make itself available as "parent object"
is an even worse anti pattern than the also infamous $pObj.

The patch removes a series of "$GLOBALS['SOBE'] = $this" assignments
in some controllers that have no further dependency to this global
anymore for a while, are easy to review and b/w compatible.

Resolves: #85958
Releases: master
Change-Id: Ia961289c344c96eab250fa7f206c677cb65e047c
Reviewed-on: https://review.typo3.org/58018
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Classes/Controller/Wizard/ListController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php

index e0b056b..e42d9c9 100644 (file)
@@ -126,7 +126,6 @@ class CreateFolderController
     public function __construct()
     {
         $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-        $GLOBALS['SOBE'] = $this;
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);
     }
index cccfde7..9acac39 100644 (file)
@@ -125,7 +125,6 @@ class EditFileController
     public function __construct()
     {
         $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-        $GLOBALS['SOBE'] = $this;
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);
     }
index 3c3221d..3e01033 100644 (file)
@@ -102,7 +102,6 @@ class FileController
      */
     public function __construct()
     {
-        $GLOBALS['SOBE'] = $this;
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);
     }
index 4cd9de9..1a8d530 100644 (file)
@@ -102,7 +102,6 @@ class ReplaceFileController
     public function __construct()
     {
         $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-        $GLOBALS['SOBE'] = $this;
 
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);
index 3015726..a44bb86 100644 (file)
@@ -79,7 +79,6 @@ class EditController extends AbstractWizardController
     public function __construct()
     {
         $this->getLanguageService()->includeLLFile('EXT:core/Resources/Private/Language/locallang_wizards.xlf');
-        $GLOBALS['SOBE'] = $this;
 
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);
index 4e52f0e..71268f0 100644 (file)
@@ -74,7 +74,6 @@ class ListController extends AbstractWizardController
     public function __construct()
     {
         $this->getLanguageService()->includeLLFile('EXT:core/Resources/Private/Language/locallang_wizards.xlf');
-        $GLOBALS['SOBE'] = $this;
 
         // @deprecated since v9, will be obsolete in v10
         $request = $GLOBALS['TYPO3_REQUEST'];
index 32701ed..2610561 100644 (file)
@@ -141,7 +141,6 @@ class TableController extends AbstractWizardController
     {
         $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
         $this->getLanguageService()->includeLLFile('EXT:core/Resources/Private/Language/locallang_wizards.xlf');
-        $GLOBALS['SOBE'] = $this;
 
         // @deprecated since v9, will be moved out of __construct() in v10
         $this->init($GLOBALS['TYPO3_REQUEST']);