Skip to content

Commit

Permalink
OPENEUROPA-1811: Fix issue with image styles generating related to la…
Browse files Browse the repository at this point in the history
…nguage selection page.
  • Loading branch information
sergepavle committed Apr 16, 2019
1 parent 8eccf1f commit 6cd4915
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function oe_multilingual_selection_page_install(): void {
'/admin*',
'/node/add/*',
'/node/*/edit',
'/sites/*/files/*',
])->save();

/** @var \Drupal\oe_multilingual\LanguageNegotiationSetterInterface $setter */
Expand All @@ -40,3 +41,15 @@ function oe_multilingual_selection_page_install(): void {
LanguageNegotiationLanguageSelectionPage::METHOD_ID => -18,
]);
}

/**
* Add files directory to blacklisted paths.
*/
function oe_multilingual_selection_page_update_8001() {
$config = \Drupal::configFactory()
->getEditable('language_selection_page.negotiation');
$blacklist = $config->get('blacklisted_paths');
$blacklist[] = '/sites/*/files/*';
$config->set('blacklisted_paths', $blacklist);
$config->save();
}

0 comments on commit 6cd4915

Please sign in to comment.