Skip to content

Commit

Permalink
Merge branch 'development' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Sep 22, 2020
2 parents 784c18d + 1094540 commit e241ae8
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Latest release: 6.0.3 (2020/06/02)
Latest release: 6.0.4 (2020/09/22)

All previous release change logs:

* [6.0.4 (2020/09/22)](Documentation/Changelog/6.0.4.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.3...6.0.4)
* [6.0.3 (2020/06/02)](Documentation/Changelog/6.0.3.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.2...6.0.3)
* [6.0.2 (2020/06/01)](Documentation/Changelog/6.0.2.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.1...6.0.2)
* [6.0.1 (2020/05/31)](Documentation/Changelog/6.0.1.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.0...6.0.1)
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ protected function copyReferencedFilesAndReplacePaths($contents, $regex, $origin
$newPath = basename($path);
$extension = pathinfo($newPath, PATHINFO_EXTENSION);
$temporaryFileName = 'vhs-assets-css-' . $checksum . '.' . $extension;
$temporaryFile = constant('PATH_site') . $this->getTempPath() . $temporaryFileName;
$temporaryFile = CoreUtility::getSitePath() . $this->getTempPath() . $temporaryFileName;
$rawPath = GeneralUtility::getFileAbsFileName(
$originalDirectory . (empty($originalDirectory) ? '' : '/')
) . $path;
Expand Down
7 changes: 4 additions & 3 deletions Classes/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use TYPO3\CMS\Core\Context\LanguageAspect;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\RootlineUtility;
use TYPO3\CMS\Frontend\Page\PageRepository;

/**
Expand Down Expand Up @@ -112,13 +113,13 @@ public function getRootLine($pageUid = null, $reverse = false, $disableGroupAcce
$cacheKey = md5($pageUid . (integer) $reverse . (integer) $disableGroupAccessCheck);
if (false === isset(static::$cachedRootlines[$cacheKey])) {
$pageRepository = $this->getPageRepository();
if (method_exists($pageRepository, 'getRootLine')) {
if (class_exists(RootlineUtility::class)) {
$rootline = (new RootlineUtility($pageUid))->get();
} elseif (method_exists($pageRepository, 'getRootLine')) {
if (true === (boolean) $disableGroupAccessCheck) {
$pageRepository->where_groupAccess = '';
}
$rootline = $pageRepository->getRootLine($pageUid);
} elseif (isset($GLOBALS['TSFE'])) {
$rootline = (array) $GLOBALS['TSFE']->rootLine;
} else {
$rootline = [];
}
Expand Down
3 changes: 2 additions & 1 deletion Classes/Utility/CoreUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public static function getSitePath(): string
if (defined('PATH_site')) {
return constant('PATH_site');
}
return Environment::getPublicPath();
/** @see https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/GlobalValues/Constants/Index.html#path-site */
return Environment::getPublicPath() . '/';
}

/**
Expand Down
6 changes: 4 additions & 2 deletions Classes/ViewHelpers/Media/Image/AbstractImageViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,16 @@ protected function simulateFrontendEnvironment()
{
$this->tsfeBackup = true === isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
$this->workingDirectoryBackup = getcwd();
chdir(constant('PATH_site'));
chdir(CoreUtility::getSitePath());
$typoScriptSetup = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT
);
$GLOBALS['TSFE'] = new \stdClass();
$template = GeneralUtility::makeInstance(TemplateService::class);
$template->tt_track = 0;
$template->init();
if (version_compare(TYPO3_version, 9.4, '<')) {
$template->init();
}
$template->getFileName_backPath = CoreUtility::getSitePath();
$GLOBALS['TSFE']->tmpl = $template;
$GLOBALS['TSFE']->tmpl->setup = $typoScriptSetup;
Expand Down
6 changes: 4 additions & 2 deletions Classes/ViewHelpers/Resource/AbstractImageViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ protected function simulateFrontendEnvironment()
$GLOBALS['TSFE'] = new \stdClass();
$template = GeneralUtility::makeInstance(TemplateService::class);
$template->tt_track = 0;
$template->init();
$template->getFileName_backPath = constant('PATH_site');
if (version_compare(TYPO3_version, 9.4, '<')) {
$template->init();
}
$template->getFileName_backPath = CoreUtility::getSitePath();
$GLOBALS['TSFE']->tmpl = $template;
$GLOBALS['TSFE']->tmpl->setup = $typoScriptSetup;
$GLOBALS['TSFE']->config = $typoScriptSetup;
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Variable/PregMatchViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function initializeArguments()
{
$this->registerAsArgument();
$this->registerArgument('pattern', 'mixed', 'Regex pattern to match against', true);
$this->registerArgument('subject', 'mixed', 'String to match with the regex pattern', true);
$this->registerArgument('subject', 'mixed', 'String to match with the regex pattern', false);
$this->registerArgument('global', 'boolean', 'Match global', false, false);
}

Expand Down
19 changes: 19 additions & 0 deletions Documentation/Changelog/6.0.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Release: 6.0.4 (2020/09/22)

* 2020-08-27 [BUGFIX] Support chain notation for PregMatchViewHelper subject (#1683) (Commit 9823d76a by Mathias Brodala)
* 2020-08-19 [BUGFIX] Prevent calling deprecated TemplateService->init() (#1661) (Commit 4305c9ab by Nicole Cordes)
* 2020-08-19 [BUGFIX] Fix rootline to filter correct by pageUid (#1681) (Commit 55df922e by dev-rke)
* 2020-06-05 [BUGFIX] Replaced Deprecated PATH_site Constant, Updated Utility Func… (#1657) (Commit 38752ac3 by masonen)

Generated by:

```
git log --since="2020/06/02" --until="2020/09/22" --abbrev-commit --pretty='%ad %s (Commit %h by %an)' \
--date=short | egrep '(\[FEATURE|BUGFIX|REMOVAL\])+'`
```

Full list of changes: https://github.com/FluidTYPO3/vhs/compare/6.0.3...6.0.4

*Please note: the change list above does not contain any TASK commits since they are considered
infrastructure-only and not relevant to end users. The full list includes these!*

0 comments on commit e241ae8

Please sign in to comment.