From: Vincent Vanwaelscappel Date: Thu, 18 Jan 2024 15:48:18 +0000 (+0100) Subject: wait #6639 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=bafee12044b9ee55032eb8d3036b7dccd0c95d93;p=fluidbook-toolbox.git wait #6639 @2 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index a2361ed3b..e74533751 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -769,6 +769,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->writeJs(); $this->log('Js written'); $this->vdir->sync(true, $this); + `chmod -R 775 $this->dir`; $this->log('Files Synced'); // $f=rtrim(str_replace('/html5/', '/compiletime/', $this->dir)); // touch($f); diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index 354508844..6b69c0db5 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -14,8 +14,8 @@ use Mockery\Exception; class Farm { protected static $_outPDF = []; - protected static $_forceServer = false; - //protected static $_forceServer = 'alphaville'; + //protected static $_forceServer = false; + protected static $_forceServer = 'alphaville'; protected static $_region = Region::EUROPE; diff --git a/app/Models/FluidbookPublication.php b/app/Models/FluidbookPublication.php index eaebdbfbb..2d82741f7 100644 --- a/app/Models/FluidbookPublication.php +++ b/app/Models/FluidbookPublication.php @@ -448,11 +448,13 @@ class FluidbookPublication extends ToolboxStatusModel if (file_exists($thumbpdf)) { try { Farm::setRegion($this->region); - return Farm::getFileFromPDF($thumbpdf, $page, $format, $resolution, $this->JPEGQuality, $withText, $withGraphics, $version, null, $force, 1); + $res = Farm::getFileFromPDF($thumbpdf, $page, $format, $resolution, $this->JPEGQuality, $withText, $withGraphics, $version, null, $force, 1); + return $res; } catch (\Exception $e) { throw new \Exception('Unable to generate thumbnails file from custom PDF "' . $this->pdfThumbnails . '" (original message : ' . $e->getMessage() . ')'); } } else { + Log::warning('Thumbnails file ' . $thumbpdf . ' not found. Generating file from standard PDF'); } } return $this->getFile($page, $format, $resolution, $withText, $withGraphics, $version, $force); diff --git a/scripts/fixrights.sh b/scripts/fixrights.sh index 6fe1cfc59..1d228909b 100644 --- a/scripts/fixrights.sh +++ b/scripts/fixrights.sh @@ -26,3 +26,5 @@ chmod -R 775 /data/toolbox/alpha/scripts chmod -R 775 /data/toolbox/alpha/protected chmod -R 775 /data/toolbox/alpha/public chmod -R 775 /data/toolbox/alpha/bin + +find /data/extranet/www/fluidbook/ -type d -prune -o -exec chown -R toolbox:www-data {} \;