From 66410e3cffce989bd84b6fb8a13c560d1cc30e8f Mon Sep 17 00:00:00 2001 From: bach Date: Wed, 23 Feb 2022 11:22:03 +0100 Subject: [PATCH] fixed drush script --- cleanflaglist.script | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleanflaglist.script b/cleanflaglist.script index e8ce9a88..3d9a876a 100755 --- a/cleanflaglist.script +++ b/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);