fixed drush script

This commit is contained in:
Bachir Soussi Chiadmi 2022-02-23 11:22:03 +01:00
parent 93779ad3ff
commit 66410e3cff
1 changed files with 3 additions and 3 deletions

View File

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