diff --git a/.gitignore b/.gitignore index 9f11b75..ea5835d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .idea/ +.Build +composer.lock +vendor \ No newline at end of file diff --git a/Classes/Hooks/Backend/Toolbar/ClearCacheActionsHook.php b/Classes/Hooks/Backend/Toolbar/ClearCacheActionsHook.php index ec7b5cb..a355de4 100644 --- a/Classes/Hooks/Backend/Toolbar/ClearCacheActionsHook.php +++ b/Classes/Hooks/Backend/Toolbar/ClearCacheActionsHook.php @@ -8,6 +8,7 @@ namespace KayStrobach\Dyncss\Hooks\Backend\Toolbar; use TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Backend\Routing\UriBuilder; @@ -26,7 +27,7 @@ class ClearCacheActionsHook implements ClearCacheActionsHookInterface public function manipulateCacheActions(&$cacheActions, &$optionValues) { $clearCacheSystemUser = (bool)($this->getBackendUser()->getTSConfig()['options.']['clearCache.']['system'] ?? false); - $isDevelopment = GeneralUtility::getApplicationContext()->isDevelopment(); + $isDevelopment = Environment::getContext()->isDevelopment(); $clearCacheSystemSys = (bool)$GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] === true; $isAdmin = $this->getBackendUser()->isAdmin(); if ($clearCacheSystemUser || $isDevelopment || ($clearCacheSystemSys && $isAdmin)) {