Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
imageapi_optimize-3226168
Commits
6af61262
Commit
6af61262
authored
Aug 23, 2018
by
Steven Jones
Committed by
Steven Jones
Aug 23, 2018
Browse files
Issue
#2994644
by Steven Jones: Previously shipped (invalid) config will reappear
parent
4c54dce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
imageapi_optimize.install
View file @
6af61262
...
...
@@ -6,9 +6,29 @@
*/
/**
*
Update misname
d config entites.
*
Remove previously invali
d config entit
i
es.
*/
function
imageapi_optimize_update_8001
()
{
$config_factory
=
\
Drupal
::
configFactory
();
// These were mis-named, so can never have been in-use by anyone.
$legacy_pipelines
=
[
'imageapi_optimize.pipeline.resmushit'
,
'imageapi_optimize.pipeline.local_binaries'
,
];
foreach
(
$legacy_pipelines
as
$legacy_pipeline
)
{
$config_list
=
$config_factory
->
listAll
(
$legacy_pipeline
);
foreach
(
$config_list
as
$config_key
)
{
$config
=
$config_factory
->
getEditable
(
$config_key
);
// Remove the old config entity.
$config
->
delete
();
}
}
}
/**
* Update misnamed config entites.
*/
function
imageapi_optimize_update_8002
()
{
$config_factory
=
\
Drupal
::
configFactory
();
$config_list
=
$config_factory
->
listAll
(
'imageapi_optimize.processor.'
);
...
...
@@ -34,7 +54,7 @@ function imageapi_optimize_update_8001() {
/**
* Re-enable sub modules.
*/
function
imageapi_optimize_update_800
2
()
{
function
imageapi_optimize_update_800
3
()
{
$modules
=
[];
$pipelines
=
\
Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline
::
loadMultiple
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment