cleanflaglist script also remove flag_action config

This commit is contained in:
Bachir Soussi Chiadmi 2022-07-25 12:26:38 +02:00
parent a00a9e0482
commit 44df557f29
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,7 @@ if ($extra[0] === "delete") {
$database = \Drupal::database(); $database = \Drupal::database();
// remove flagging collection with null name
$this->output()->writeln(""); $this->output()->writeln("");
$this->output()->writeln("Flagging collection With NULL name cleaning"); $this->output()->writeln("Flagging collection With NULL name cleaning");
$fcfd_query = $database->select('flagging_collection_field_data', 'fcfd') $fcfd_query = $database->select('flagging_collection_field_data', 'fcfd')
@ -151,6 +152,14 @@ function delete_flagingcollection($fc, $database, $delete){
->condition('name', 'flag.flag.' . $fc->relatedflag) ->condition('name', 'flag.flag.' . $fc->relatedflag)
->execute(); ->execute();
$database->delete('config')
->condition('name', 'system.action.flag_action.'.$fc->relatedflag.'_flag')
->execute();
$database->delete('config')
->condition('name', 'system.action.flag_action.'.$fc->relatedflag.'_unflag')
->execute();
$database->delete('flagging_collection_field_data') $database->delete('flagging_collection_field_data')
->condition('id', $fc->id) ->condition('id', $fc->id)

View File

@ -2,3 +2,6 @@ _core:
default_config_hash: p_qzzTwtOMiIPE7CyG0wD6M-UCpBp6Y5E4LhNCnCRpY default_config_hash: p_qzzTwtOMiIPE7CyG0wD6M-UCpBp6Y5E4LhNCnCRpY
langcode: en langcode: en
read_only: true read_only: true
maintenance_header_retry_seconds:
min: 5
max: 10