Skip to content
Snippets Groups Projects
Commit 6cf74006 authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Issue #3380638: Not possible to exclude selected media bundles

parent 8dc1036a
Branches 8.x-1.x
Tags 1.2.0
1 merge request!28Issue #3380638: Not possible to exclude selected media bundles
......@@ -140,13 +140,13 @@ class DisplayController extends EntityViewController {
if (!empty($config->get('media_bundles'))) {
$allow_all_bundles = TRUE;
foreach ($config->get('media_bundles') as $allowed_bundle) {
if ($allowed_bundle !== 0) {
if (!empty($allowed_bundle)) {
$allow_all_bundles = FALSE;
break;
}
}
if (!$allow_all_bundles && isset($allowed_bundles[$media_bundle]) && $allowed_bundles[$media_bundle] === 0) {
if (!$allow_all_bundles && isset($allowed_bundles[$media_bundle]) && empty($allowed_bundles[$media_bundle])) {
return $this->updateRenderCache(parent::view($media, $view_mode), $config);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment