Skip to content

Commit

Permalink
BUGFIX: remove unused variable in controller
Browse files Browse the repository at this point in the history
- remove unused variable `$policyService` and import in UsageController.php and fix formatting
- correct commentary in Settings.yaml

Issue: neos#5181
  • Loading branch information
habuchholz committed Jul 26, 2024
1 parent 3f5f41c commit 421f7a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 6 additions & 14 deletions Neos.Media.Browser/Classes/Controller/UsageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ActionController;
use Neos\Flow\Security\Context;
use Neos\Flow\Security\Policy\PolicyService;
use Neos\Media\Domain\Model\AssetInterface;
use Neos\Media\Domain\Service\AssetService;
use Neos\Neos\Controller\CreateContentContextTrait;
Expand Down Expand Up @@ -88,12 +87,6 @@ class UsageController extends ActionController
*/
protected $securityContext;

/**
* @Flow\Inject
* @var PolicyService
*/
protected $policyService;

/**
* @Flow\InjectConfiguration(package="Neos.Media.Browser", path="features.showWorkspaceOwnerOrName")
* @var array
Expand Down Expand Up @@ -202,13 +195,12 @@ public function relatedNodesAction(AssetInterface $asset)
*/
private function getNodeFrom(AssetUsageInNodeProperties $assetUsage)
{
$context = $this->_contextFactory->create(
[
'workspaceName' => $assetUsage->getWorkspaceName(),
'dimensions' => $assetUsage->getDimensionValues(),
'invisibleContentShown' => true,
'removedContentShown' => true]
);
$context = $this->_contextFactory->create([
'workspaceName' => $assetUsage->getWorkspaceName(),
'dimensions' => $assetUsage->getDimensionValues(),
'invisibleContentShown' => true,
'removedContentShown' => true
]);
return $context->getNodeByIdentifier($assetUsage->getNodeIdentifier());
}
}
2 changes: 1 addition & 1 deletion Neos.Media.Browser/Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Neos:
# By default, enable the option to create redirects for replaced asset resources
createAssetRedirectsOption:
enable: true
# By default, disable showing the workspace owner/title in media browser usage tab
# By default, enable showing the workspace owner/title in media browser usage tab
showWorkspaceOwnerOrName:
enable: true

Expand Down

0 comments on commit 421f7a8

Please sign in to comment.