"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Neos.Neos/Classes/Routing/FrontendNodeRoutePartHandler.php" between
neos-development-collection-7.0.0.tar.gz and neos-development-collection-7.0.1.tar.gz

About: TYPO3 Neos is a Content Application Platform with a CMS and an application framework at its core (based on the PHP web application platform "FLOW3").

FrontendNodeRoutePartHandler.php  (neos-development-collection-7.0.0):FrontendNodeRoutePartHandler.php  (neos-development-collection-7.0.1)
skipping to change at line 269 skipping to change at line 269
} }
if (!$this->nodeTypeIsAllowed($node)) { if (!$this->nodeTypeIsAllowed($node)) {
return false; return false;
} }
$siteNode = $contentContext->getCurrentSiteNode(); $siteNode = $contentContext->getCurrentSiteNode();
if ($this->onlyMatchSiteNodes() && $node !== $siteNode) { if ($this->onlyMatchSiteNodes() && $node !== $siteNode) {
return false; return false;
} }
$nodeOrUri = $this->resolveShortcutNode($node); try {
$nodeOrUri = $this->resolveShortcutNode($node);
} catch (Exception\InvalidShortcutException $exception) {
$this->systemLogger->debug('FrontendNodeRoutePartHandler resolveValu
e(): ' . $exception->getMessage());
return false;
}
if ($nodeOrUri instanceof UriInterface) { if ($nodeOrUri instanceof UriInterface) {
return new ResolveResult('', UriConstraints::fromUri($nodeOrUri), nu ll); return new ResolveResult('', UriConstraints::fromUri($nodeOrUri), nu ll);
} }
try { try {
$uriConstraints = $this->buildUriConstraintsForResolvedNode($nodeOrU ri); $uriConstraints = $this->buildUriConstraintsForResolvedNode($nodeOrU ri);
} catch (Exception\NoSiteException $exception) { } catch (Exception\NoSiteException $exception) {
$this->systemLogger->debug('FrontendNodeRoutePartHandler resolveValu e(): ' . $exception->getMessage()); $this->systemLogger->debug('FrontendNodeRoutePartHandler resolveValu e(): ' . $exception->getMessage());
return false; return false;
} }
skipping to change at line 307 skipping to change at line 312
$suffixLength = strlen($this->options['uriPathSuffix']); $suffixLength = strlen($this->options['uriPathSuffix']);
if (substr($uriPath, -$suffixLength) !== $this->options['uriPathSuffix'] ) { if (substr($uriPath, -$suffixLength) !== $this->options['uriPathSuffix'] ) {
throw new Exception\InvalidRequestPathException(sprintf('The request path "%s" doesn\'t contain the configured uriPathSuffix "%s"', $uriPath, $this- >options['uriPathSuffix']), 1604912439); throw new Exception\InvalidRequestPathException(sprintf('The request path "%s" doesn\'t contain the configured uriPathSuffix "%s"', $uriPath, $this- >options['uriPathSuffix']), 1604912439);
} }
return substr($uriPath, 0, -$suffixLength); return substr($uriPath, 0, -$suffixLength);
} }
/** /**
* @param NodeInterface $node * @param NodeInterface $node
* @return NodeInterface|Uri The original, unaltered $node if it's not a sho rtcut node. Otherwise the nodes shortcut target (a node or an URI for external & asset shortcuts) * @return NodeInterface|Uri The original, unaltered $node if it's not a sho rtcut node. Otherwise the nodes shortcut target (a node or an URI for external & asset shortcuts)
* @throws NeosException * @throws Exception\InvalidShortcutException
*/ */
protected function resolveShortcutNode(NodeInterface $node) protected function resolveShortcutNode(NodeInterface $node)
{ {
$resolvedNode = $this->nodeShortcutResolver->resolveShortcutTarget($node ); $resolvedNode = $this->nodeShortcutResolver->resolveShortcutTarget($node );
if (is_string($resolvedNode)) { if (is_string($resolvedNode)) {
return new Uri($resolvedNode); return new Uri($resolvedNode);
} }
if (!$resolvedNode instanceof NodeInterface) { if (!$resolvedNode instanceof NodeInterface) {
throw new NeosException(sprintf('Could not resolve shortcut target f or node "%s"', $node->getPath()), 1414771137); throw new Exception\InvalidShortcutException(sprintf('Could not reso lve shortcut target for node "%s"', $node->getPath()), 1414771137);
} }
return $resolvedNode; return $resolvedNode;
} }
/** /**
* Builds UriConstraints for the given $node with: * Builds UriConstraints for the given $node with:
* * domain specific constraints for nodes in a different Neos site * * domain specific constraints for nodes in a different Neos site
* * a path suffix corresponding to the configured "uriPathSuffix" * * a path suffix corresponding to the configured "uriPathSuffix"
* *
* @param NodeInterface $node * @param NodeInterface $node
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)