From b086fd0a73b5c841e529f5d619ef81476008c640 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 21 Feb 2024 16:00:48 +0100 Subject: [PATCH] wip #6717 @0.25 --- app/Jobs/FluidbookSettingsExport.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/Jobs/FluidbookSettingsExport.php b/app/Jobs/FluidbookSettingsExport.php index 1aa089340..b429f0253 100644 --- a/app/Jobs/FluidbookSettingsExport.php +++ b/app/Jobs/FluidbookSettingsExport.php @@ -30,6 +30,7 @@ class FluidbookSettingsExport extends Base $this->userID = $userID; $this->directDownload = $directDownload; } + public function handle() { $user = User::withoutGlobalScopes()->find($this->userID); //5908 @@ -54,13 +55,13 @@ class FluidbookSettingsExport extends Base $name = $field->getName(); /** @var $field Field */ if ($field instanceof UnstoredField || in_array($name, ['deleted_at', 'videoPath'])) { - - } else { - $fields[$name] = [ - 'default' => $field->getAttribute('default'), - 'noteditable' => $field instanceof Hidden - ]; + continue; } + $fields[$name] = [ + 'default' => $field->getAttribute('default'), + 'noteditable' => $field instanceof Hidden + ]; + } $keys = array_keys($fields); @@ -140,14 +141,15 @@ class FluidbookSettingsExport extends Base $hash = explode('cubist', $tmpfile)[1]; $file = base64_encode($hash); - if($this->directDownload) { + if ($this->directDownload) { return $tmpfile; } return $this->notification($user, $file); } - protected function notification($user, $file) { + protected function notification($user, $file) + { $url = route('download_settings', ['file' => $file]); $subject = __("Export groupé des paramètres des fluidbooks prêt au téléchargement"); $notification = ''; -- 2.39.5