ソースを参照

cleanflaglist script also remove flag_action config

bach 2 年 前
コミット
44df557f29
2 ファイル変更12 行追加0 行削除
  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