@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | $dispatcher = $bootstrap->getSignalSlotDispatcher(); |
18 | 18 | $newUriPathSegment = NULL; |
19 | 19 | $dispatcher->connect('TYPO3\TYPO3CR\Domain\Model\Node', 'nodePropertyChanged', function(Node $node, $propertyName, $oldValue, $newValue) use($bootstrap, &$newUriPathSegment) { |
20 | - $q = new FlowQuery(array($node)); |
|
21 | - $q = $q->context(array('invisibleContentShown' => true, 'removedContentShown' => true, 'inaccessibleContentShown' => true)); |
|
20 | + $q = new FlowQuery(array($node)); |
|
21 | + $q = $q->context(array('invisibleContentShown' => true, 'removedContentShown' => true, 'inaccessibleContentShown' => true)); |
|
22 | 22 | |
23 | 23 | if ($propertyName === 'title' && $node->getNodeType()->isOfType('TYPO3.Neos:Document')) { |
24 | 24 | if (method_exists('TYPO3\Neos\Utility\NodeUriPathSegmentGenerator', 'generateUriPathSegment')) { |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | $initialUriPathSegment = $newUriPathSegment; |
32 | - $i = 1; |
|
33 | - while ($q->siblings('[instanceof TYPO3.Neos:Document][uriPathSegment="' . $newUriPathSegment . '"]')->count() > 0) { |
|
34 | - $newUriPathSegment = $initialUriPathSegment . '-' . $i++; |
|
35 | - } |
|
32 | + $i = 1; |
|
33 | + while ($q->siblings('[instanceof TYPO3.Neos:Document][uriPathSegment="' . $newUriPathSegment . '"]')->count() > 0) { |
|
34 | + $newUriPathSegment = $initialUriPathSegment . '-' . $i++; |
|
35 | + } |
|
36 | 36 | |
37 | 37 | $node->setProperty('uriPathSegment', $newUriPathSegment); |
38 | 38 | $bootstrap->getObjectManager()->get('TYPO3\Neos\Routing\Cache\RouteCacheFlusher')->registerNodeChange($node); |
@@ -30,8 +30,8 @@ |
||
30 | 30 | |
31 | 31 | $initialUriPathSegment = $newUriPathSegment; |
32 | 32 | $i = 1; |
33 | - while ($q->siblings('[instanceof TYPO3.Neos:Document][uriPathSegment="' . $newUriPathSegment . '"]')->count() > 0) { |
|
34 | - $newUriPathSegment = $initialUriPathSegment . '-' . $i++; |
|
33 | + while ($q->siblings('[instanceof TYPO3.Neos:Document][uriPathSegment="'.$newUriPathSegment.'"]')->count() > 0) { |
|
34 | + $newUriPathSegment = $initialUriPathSegment.'-'.$i++; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $node->setProperty('uriPathSegment', $newUriPathSegment); |