|
12 | 12 | use Neos\Flow\Utility\Algorithms; |
13 | 13 | use Neos\Neos\Ui\ContentRepository\Service\NodeService; |
14 | 14 | use Neos\Neos\Ui\Controller\BackendServiceController; |
15 | | -use Neos\Neos\Ui\Domain\Model\Feedback\Messages\Success; |
16 | 15 | use Neos\Neos\Ui\Domain\Model\FeedbackCollection; |
17 | | -use Neos\Utility\ObjectAccess; |
18 | 16 | use Netlogix\Neos\AsyncWorkspaceActions\Domain\Model\Job; |
19 | 17 | use Netlogix\Neos\AsyncWorkspaceActions\Domain\Repository\JobRepository; |
20 | 18 | use Netlogix\Neos\AsyncWorkspaceActions\Job\Workspace\Publish; |
@@ -82,20 +80,9 @@ public function publish(JoinPointInterface $joinPoint) |
82 | 80 |
|
83 | 81 | $nodeContextPaths = $this->filterExistingContextPaths($joinPoint->getMethodArgument('nodeContextPaths')); |
84 | 82 | $joinPoint->setMethodArgument('nodeContextPaths', $nodeContextPaths); |
85 | | - if (count($nodeContextPaths) === 0) { |
86 | | - $success = new Success(); |
87 | | - $success->setMessage('No nodes to publish'); |
88 | | - $this->feedbackCollection->add($success); |
89 | | - |
90 | | - $view = ObjectAccess::getProperty($controller, 'view', true); |
91 | | - $view->assign('value', $this->feedbackCollection); |
92 | | - |
93 | | - return; |
94 | | - } |
95 | 83 |
|
96 | 84 | $requestHandler = $this->bootstrap->getActiveRequestHandler(); |
97 | | - |
98 | | - if (!($requestHandler instanceof HttpRequestHandlerInterface) || count($nodeContextPaths) < $this->threshold) { |
| 85 | + if (!($requestHandler instanceof HttpRequestHandlerInterface) || count($nodeContextPaths) === 0 || count($nodeContextPaths) < $this->threshold) { |
99 | 86 | $joinPoint->getAdviceChain()->proceed($joinPoint); |
100 | 87 | return; |
101 | 88 | } |
|
0 commit comments