From a359831c99621604886db855d58fc805df09e5cd Mon Sep 17 00:00:00 2001 From: Wouter Wolters Date: Sat, 3 Sep 2016 11:27:48 +0200 Subject: [PATCH] [TASK] Cleanup and deprecate TYPO3_DB occurrences All instances of $GLOBALS[TYPO3_DB] in the TYPO3 Core classes except for certain highly used functionalities have been removed. The places where the TYPO3 Core is expected to have subclasses within extensions have been marked for deprecation. Resolves: #78224 Releases: master Change-Id: Ie65878264679b93940ac9fb86c4758576d98c550 Reviewed-on: https://review.typo3.org/49824 Tested-by: TYPO3com Reviewed-by: Wouter Wolters Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Benni Mack Tested-by: Benni Mack --- Classes/FrontendEditPanel.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index ee15e69..9cda050 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -15,7 +15,6 @@ namespace TYPO3\CMS\Feedit; */ use TYPO3\CMS\Backend\FrontendBackendUserAuthentication; use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\Database\DatabaseConnection; use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation; @@ -45,13 +44,6 @@ class FrontendEditPanel */ protected $frontendController; - /** - * Property for accessing DatabaseConnection centrally - * - * @var DatabaseConnection - */ - protected $databaseConnection; - /** * @var FrontendBackendUserAuthentication */ @@ -65,13 +57,12 @@ class FrontendEditPanel /** * Constructor for the edit panel * - * @param DatabaseConnection $databaseConnection + * @param mixed $_ Previous the database connection * @param TypoScriptFrontendController $frontendController * @param FrontendBackendUserAuthentication $backendUser */ - public function __construct(DatabaseConnection $databaseConnection = null, TypoScriptFrontendController $frontendController = null, FrontendBackendUserAuthentication $backendUser = null) + public function __construct($_ = null, TypoScriptFrontendController $frontendController = null, FrontendBackendUserAuthentication $backendUser = null) { - $this->databaseConnection = $databaseConnection ?: $GLOBALS['TYPO3_DB']; $this->frontendController = $frontendController ?: $GLOBALS['TSFE']; $this->backendUser = $backendUser ?: $GLOBALS['BE_USER']; $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);