]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6717 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Feb 2024 15:00:48 +0000 (16:00 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 21 Feb 2024 15:00:48 +0000 (16:00 +0100)
app/Jobs/FluidbookSettingsExport.php

index 1aa089340dd32d62ecc42e4e3bddb31297e702dd..b429f02539924162176ae925b041aadc40fedc11 100644 (file)
@@ -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 = '';