]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6474 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Nov 2023 14:02:51 +0000 (15:02 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Nov 2023 14:02:51 +0000 (15:02 +0100)
app/Fluidbook/Compiler/Secure.php
app/Fluidbook/Farm.php
app/Models/FluidbookPublication.php
resources/views/vendor/backpack/crud/buttons/fluidbook_publication/download.blade.php

index 84c079da6fdad7c4861a7985994086f91a3cbff0..44464769cbc0fd11934743365f4c71b8da050361 100644 (file)
@@ -11,7 +11,7 @@ trait Secure
     protected function writeSecure()
     {
 
-        if (trim($this->fluidbookSettings->secureClientSidePasswordCredentials)) {
+        if (isset($this->fluidbookSettings->secureClientSidePasswordCredentials) && null !== $this->fluidbookSettings->secureClientSidePasswordCredentials && trim($this->fluidbookSettings->secureClientSidePasswordCredentials)) {
             $this->writeSecurePage();
         }
 
index f348806c76abea8daa480b5ba34a103b800ff6ee..e71026e9acc4bdac3436edcdb39964b3f6625731 100644 (file)
@@ -15,8 +15,8 @@ class Farm
 {
 
     protected static $_outPDF = [];
-    protected static $_forceServer = false;
-    //protected static $_forceServer = 'alphaville';
+    //protected static $_forceServer = false;
+    protected static $_forceServer = 'alphaville';
     protected static $_farmServers = [
         ['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 12, 'region' => 'UE'],
         ['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 6, 'region' => 'US'],
index 0cf8773ace4271599a3b1f09e701f01bf2695400..cb9b40d1b3d05a8746bb1b9f556626bb28d7857b 100644 (file)
@@ -279,6 +279,20 @@ class FluidbookPublication extends ToolboxSettingsModel
         return parent::setAttribute($key, $value);
     }
 
+    public function onRetrieved(): bool
+    {
+        $res = parent::onRetrieved();
+
+        foreach ($this->getFields() as $field) {
+            $n = $field->getName();
+            if (!isset($this->{$n}) || null === $this->{$n}) {
+                $default = $field->getAttribute('default') ?? '';
+                $this->{$n} = $default;
+            }
+        }
+
+        return $res;
+    }
 
     public function onSaving(): bool
     {
index 808d1397a7795e08859ff926dba178996b45e162..e56bab66ab5d87ed17add00159d37d9fd071cd1d 100644 (file)
@@ -38,7 +38,7 @@
     }
     if(can('fluibook-publication:download:install-hosting') && ($entry->install_online || $entry->scorm_enable)){
         $installActions['sep_install']='---------';
-        if($entry->install_online && $entry->install_online->server && isset($servers[$entry->install_online->server])){
+        if($entry->install_online && is_object($entry->install_online) && $entry->install_online->server && isset($servers[$entry->install_online->server])){
             $server=$servers[$entry->install_online->server];
             if($entry->install_online->path || $server['allows_root']){
                 $installActions['install_online']=[