Commit fa5e95a0 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Refactored misleading function and var name

parent 9a48a613
......@@ -96,7 +96,7 @@ class MailController extends ActionController {
$this->redirect('index', $this->session->getDataByKey('mode'));
}
$registerArray = BackendService::getWhitelistedTemplates($pid);
$registerArray = BackendService::getNonBlacklistedTemplates($pid);
$removeExtensionKeys = [];
foreach ($registerArray as $extensionKey => $extensionTemplates) {
......
......@@ -97,7 +97,7 @@ class QueueController extends ActionController {
$this->view->assign('selectedTemplateFilter', $filters['filterTemplate']);
$this->view->assign('selectedExtensionFilter', $filters['filterExtension']);
$registerArray = BackendService::getWhitelistedTemplates($pageUid);
$registerArray = BackendService::getNonBlacklistedTemplates($pageUid);
if ($selectedTemplate === NULL || $selectedTemplate === '') {
$selectedExtension = key($registerArray);
$selectedTemplate = key($registerArray[$selectedExtension]);
......
......@@ -260,7 +260,7 @@ class BackendService {
*/
public static function getTemplatesForFilter($pageUid): array {
$pageUid = (int) $pageUid;
$registerArray = self::getWhitelistedTemplates($pageUid);
$registerArray = self::getNonBlacklistedTemplates($pageUid);
$templates = [];
foreach ($registerArray as $extensions) {
foreach ($extensions as $template => $key) {
......@@ -408,7 +408,7 @@ class BackendService {
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
* @return array
*/
public static function getWhitelistedTemplates($siteRootId): array {
public static function getNonBlacklistedTemplates($siteRootId): array {
$siteRootId = (int) $siteRootId;
$registerArray = MailTemplateService::getRegisterArray();
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sg_mail'], []);
......
......@@ -756,10 +756,10 @@ class MailTemplateService {
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
*/
public static function isTemplateBlacklisted($extensionKey, $templateName, $siteRootId): bool {
$whitelistedTemplates = BackendService::getWhitelistedTemplates($siteRootId);
$nonBlacklistedTemplates = BackendService::getNonBlacklistedTemplates($siteRootId);
if ($whitelistedTemplates[$extensionKey]) {
return $whitelistedTemplates[$extensionKey][$templateName] ? FALSE : TRUE;
if ($nonBlacklistedTemplates[$extensionKey]) {
return $nonBlacklistedTemplates[$extensionKey][$templateName] ? FALSE : TRUE;
}
return TRUE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment