Explorar o código

fixed drush script

bach %!s(int64=2) %!d(string=hai) anos
pai
achega
66410e3cff
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      cleanflaglist.script

+ 3 - 3
cleanflaglist.script

@@ -42,7 +42,7 @@ foreach ($fcfd_result as $fc) {
   $this->output()->writeln($flifd_query->countQuery()->execute()->fetchField() . " items for fc " . $fc->id . ' with baseflag ' . $fc->relatedflag);
   // $this->output()->writeln(print_r($flifd_result->fetchAssoc(), true) . " items");
 
-  delete_flagingcollection($fc);
+  delete_flagingcollection($fc, $delete);
 }
 
 
@@ -65,12 +65,12 @@ foreach ($fcfd_result as $fc) {
   if(!$count){
     $this->output()->writeln($count . " relatedflag");
     $fc_missing_relatedflag ++;
-    delete_flagingcollection($fc);
+    delete_flagingcollection($fc, $delete);
   }
 }
 $this->output()->writeln($fc_missing_relatedflag .' flagging_collection with missing related_flag');
 
-function delete_flagingcollection($fc){
+function delete_flagingcollection($fc, $delete){
   if($delete){
     // $this is not working in function
     // $this->output()->writeln("Deleting flagging collection " . $fc->id);