Skip to content

Commit

Permalink
TASK: Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed May 24, 2023
1 parent da5a085 commit 71b63f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function findDefault(): EditPreviewMode

public function findByName(string $name): EditPreviewMode
{
if (array_key_exists($name,$this->editPreviewModeConfigurations)) {
if (array_key_exists($name, $this->editPreviewModeConfigurations)) {
return EditPreviewMode::fromNameAndConfiguration($name, $this->editPreviewModeConfigurations[$name]);
}
throw new InvalidEditPreviewModeException(sprintf('"%s" is not a valid editPreviewMode', $name), 1683790077);
Expand Down
3 changes: 2 additions & 1 deletion Neos.Neos/Classes/FrontendRouting/NodeUriBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public function uriFor(NodeAddress $nodeAddress): UriInterface
{
if (!$nodeAddress->isInLiveWorkspace()) {
$request = $this->uriBuilder->getRequest();
if ($request->getControllerPackageKey() === 'Neos.Neos'
if (
$request->getControllerPackageKey() === 'Neos.Neos'
&& $request->getControllerName() === "Frontend\Node"
) {
if ($request->getControllerActionName() == 'edit') {
Expand Down
3 changes: 2 additions & 1 deletion Neos.Neos/Classes/Fusion/Helper/BackendHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public function isPreviewMode(ActionRequest $request): bool

public function editPreviewModeCacheIdentifier(ActionRequest $request): string
{
if ($request->getControllerPackageKey() === 'Neos.Neos'
if (
$request->getControllerPackageKey() === 'Neos.Neos'
&& $request->getControllerName() === "Frontend\Node"
&& ($request->getControllerActionName() === 'edit' || $request->getControllerActionName() === 'preview')
) {
Expand Down
5 changes: 3 additions & 2 deletions Neos.Neos/Classes/Service/LinkingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,13 @@ public function createNodeUri(
$uriBuilder = clone $controllerContext->getUriBuilder();
$uriBuilder->setRequest($request);

if ($request->getControllerPackageKey() === 'Neos.Neos'
if (
$request->getControllerPackageKey() === 'Neos.Neos'
&& $request->getControllerName() === "Frontend\Node"
&& in_array($request->getControllerActionName(), ['edit', 'preview'])
) {
$action = $request->getControllerActionName();
if ( $request->hasArgument('editPreviewMode')) {
if ($request->hasArgument('editPreviewMode')) {
$arguments['editPreviewMode'] = $request->getArgument('editPreviewMode');
}
} else {
Expand Down

0 comments on commit 71b63f3

Please sign in to comment.