Parcourir la source

cleanflaglist script also remove flag_action config

bach il y a 2 ans
Parent
commit
44df557f29
2 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 9 0
      cleanflaglist.script
  2. 3 0
      config/sync/jsonapi.settings.yml

+ 9 - 0
cleanflaglist.script

@@ -20,6 +20,7 @@ if ($extra[0] === "delete") {
 
 $database = \Drupal::database();
 
+// remove flagging collection with null name
 $this->output()->writeln("");
 $this->output()->writeln("Flagging collection With NULL name cleaning");
 $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)
     ->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')
       ->condition('id', $fc->id)

+ 3 - 0
config/sync/jsonapi.settings.yml

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