From a9a82ea4d54d3017972207b7f0b1c85f08539846 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 16 Nov 2023 19:41:50 +0100 Subject: [PATCH] wait #6486 @0.25 --- app/Models/FluidbookPublication.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/app/Models/FluidbookPublication.php b/app/Models/FluidbookPublication.php index 317425812..8b3847e84 100644 --- a/app/Models/FluidbookPublication.php +++ b/app/Models/FluidbookPublication.php @@ -283,20 +283,6 @@ class FluidbookPublication extends ToolboxSettingsModel return parent::setAttribute($key, $value); } - public function onRetrieved(): bool - { - $res = parent::onRetrieved(); - $fields = ['imageFormat', 'secureClientSidePassword', 'relay_url_params']; - foreach ($fields as $n) { - $f = $this->getField($n); - if (!isset($this->{$n}) || null === $this->{$n}) { - $this->{$n} = $f->getAttribute('default'); - } - } - - return $res; - } - public function onSaving(): bool { $this->setComposedAttributes(); @@ -1025,12 +1011,18 @@ class FluidbookPublication extends ToolboxSettingsModel $version = 3; } $this->version = $version; + $fields = ['imageFormat', 'secureClientSidePassword', 'relay_url_params']; + foreach ($fields as $n) { + $f = $this->getField($n); + if (null === $this->{$n}) { + $this->{$n} = $f->getAttribute('default'); + } + } $this->save(); DB::update('UPDATE ' . WorkshopMigration::OLD_DB . '.books SET version=' . $version . ' WHERE book_id=' . $this->id); } - public function generateThumbnailsPreview($sync = false) { $mobilefirstFluidbookId = $this->mobilefirstFluidbookId; -- 2.39.5