Skip to content

Commit 1745188

Browse files
committed
fix: Remove special handling for empty $nodeContextPaths
We may as well have that handled by the original Neos UI
1 parent f099591 commit 1745188

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

Classes/Aspect/WorkspaceControllerPublishAspect.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
use Neos\Flow\Utility\Algorithms;
1313
use Neos\Neos\Ui\ContentRepository\Service\NodeService;
1414
use Neos\Neos\Ui\Controller\BackendServiceController;
15-
use Neos\Neos\Ui\Domain\Model\Feedback\Messages\Success;
1615
use Neos\Neos\Ui\Domain\Model\FeedbackCollection;
17-
use Neos\Utility\ObjectAccess;
1816
use Netlogix\Neos\AsyncWorkspaceActions\Domain\Model\Job;
1917
use Netlogix\Neos\AsyncWorkspaceActions\Domain\Repository\JobRepository;
2018
use Netlogix\Neos\AsyncWorkspaceActions\Job\Workspace\Publish;
@@ -82,20 +80,9 @@ public function publish(JoinPointInterface $joinPoint)
8280

8381
$nodeContextPaths = $this->filterExistingContextPaths($joinPoint->getMethodArgument('nodeContextPaths'));
8482
$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-
}
9583

9684
$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) {
9986
$joinPoint->getAdviceChain()->proceed($joinPoint);
10087
return;
10188
}

0 commit comments

Comments
 (0)