Skip to content

Commit

Permalink
[BUGFIX] DatabaseRecordList constructor
Browse files Browse the repository at this point in the history
- Set translateTools without wrapper method
- Remove the unnecessarily duplicate IconFactory

Releases: master
Resolves: #92061
Change-Id: I367a4bc1d324003fdb02b0ac98f4dd5f6cd02f1f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65399
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
  • Loading branch information
dawind authored and ervaude committed Aug 21, 2020
1 parent 1ae3bb2 commit 8537212
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,7 @@ public function __construct()
}
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

$this->getTranslateTools();

$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->translateTools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
}

/**
Expand Down Expand Up @@ -3953,7 +3950,7 @@ public function initializeLanguages()
$this->pageOverlays[$row[$languageField]] = $row;
}

$this->languageIconTitles = $this->getTranslateTools()->getSystemLanguages($this->id);
$this->languageIconTitles = $this->translateTools->getSystemLanguages($this->id);
}

/**
Expand Down Expand Up @@ -3981,19 +3978,6 @@ public function languageFlag($sys_language_uid, $addAsAdditionalText = true)
return $out;
}

/**
* Gets an instance of TranslationConfigurationProvider
*
* @return TranslationConfigurationProvider
*/
protected function getTranslateTools()
{
if (!isset($this->translateTools)) {
$this->translateTools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
}
return $this->translateTools;
}

/**
* Generates HTML code for a Reference tooltip out of
* sys_refindex records you hand over
Expand Down

0 comments on commit 8537212

Please sign in to comment.