Skip to content
Snippets Groups Projects
Unverified Commit be7966d8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3036787 by yongt9412, Berdir: media_post_update_enable_standalone_url()...

Issue #3036787 by yongt9412, Berdir: media_post_update_enable_standalone_url() should only set TRUE if not already set
parent 589f610f
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,8 @@ function media_post_update_storage_handler() {
* Keep media items viewable at /media/{id}.
*/
function media_post_update_enable_standalone_url() {
\Drupal::configFactory()
->getEditable('media.settings')
->set('standalone_url', TRUE)
->save(TRUE);
$config = \Drupal::configFactory()->getEditable('media.settings');
if ($config->get('standalone_url') === NULL) {
$config->set('standalone_url', TRUE)->save(TRUE);
}
}
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