]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5898 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Apr 2023 17:19:54 +0000 (19:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Apr 2023 17:19:54 +0000 (19:19 +0200)
app/Fluidbook/Compiler.php
app/Jobs/Maintenance/CheckPublicationsHashAndCid.php
app/Models/FluidbookPublication.php
resources/views/columns/owner.blade.php

index 8cf4d20162f757d56f1fa5b6dff1ebf39fe06f56..5461ab701d86cc5c4d2da5fbebd978fe41fbb8d8 100644 (file)
@@ -2882,6 +2882,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
             }
         }
         $data['id'] = $this->book_id;
+        $data['compiler'] = 3;
         return 'var SETTINGS=' . json_encode($data) . ';' . "\n";
     }
 
index 5ddce2da2222a794824bf7474e1d11f2949633e3..c04982d6f28b3ef6effd38722e13aab5666abf56 100644 (file)
@@ -11,7 +11,7 @@ class CheckPublicationsHashAndCid extends Base
     public function handle()
     {
         /** @var FluidbookPublication $fluidbook */
-        foreach (FluidbookPublication::withoutGlobalScopes()->whereNull('hash')->orWhere('hash', '')->orWhereNull('cid')->orWhere('cid', '')->get() as $fluidbook) {
+        foreach (FluidbookPublication::withoutGlobalScopes()->where('created_ok', '1')->whereNull('hash')->orWhere('hash', '')->orWhereNull('cid')->orWhere('cid', '')->get() as $fluidbook) {
             $fluidbook->save();
             echo 'Process ' . $fluidbook->id . "\n";
         }
index 995823380f9c7db2082777df2035a3a88655c9c1..9e0d41ca3bfbd70910a942406a3a790706a1f7dc 100644 (file)
@@ -275,7 +275,12 @@ class FluidbookPublication extends ToolboxSettingsModel
         $this->extranet_project = '';
 
         $this->c_title = $this->title;
-        $this->c_pages = count($this->composition);
+        if (null !== $this->composition) {
+            $this->c_pages = count($this->composition);
+        } else {
+            Log::warning('Fluidbook ' . $this->id . ' has empty composition');
+        }
+
     }
 
     public function __($str)
index c64660cad6d84f4be705917877119f95be55bf7f..6903d6809ab512cab9e3a6dff2ef1545beaf8c9d 100644 (file)
@@ -48,7 +48,7 @@
             }).then((result) => {
                 if (result.isConfirmed) {
                     let select = $(Swal.getHtmlContainer()).find('select');
-                    window.location = '{{backpack_url($entry->getOption('name').'/'.$entry->id.'/changeowner')}}/' + select.val();
+                    window.location = '{{backpack_url($entry->getOption('name'))}}/' + $(a).data('entry-id') + '/changeowner/' + select.val();
                 }
             });
             return false;
@@ -68,5 +68,6 @@
             <option value="{{$values}}" selected>{!! $v !!}</option>
         </select>
     </div>
-    <a href="#" class="changeowner" title="{{__('Modifier le propriĆ©taire')}}">{!! $v !!}</a>
+    <a href="#" class="changeowner" data-entry-id="{{$entry->id}}"
+       title="{{__('Modifier le propriĆ©taire')}}">{!! $v !!}</a>
 </span>