From: vincent@cubedesigners.com Date: Fri, 8 Apr 2022 16:57:39 +0000 (+0000) Subject: wip #5220 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7cdfce932d0fbd4cb9cbf357dee9dc9611b91254;p=cubeextranet.git wip #5220 @0.75 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 8ce1594ef..449eac7cc 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1838,15 +1838,20 @@ class wsMaintenance $doc = $dao->selectById($doc_id); $files = [ -// ['jpg', 'thumb', true, true, ''], -// ['jpg', '300', true, true, 'html'], -// ['jpg', '150', true, true, 'html'], -// ['jpg', '150', false, true, 'html'], -// ['jpg', '150', false, true, 'html'], -// ['svg', '150', true, false, 'html'], + ['jpg', 'thumb', true, true, ''], + ['jpg', '300', true, true, 'html'], + ['jpg', '150', true, true, 'html'], + ['jpg', '150', false, true, 'html'], + ['jpg', '150', false, true, 'html'], + ['png', 'thumb', true, true, ''], + ['png', '300', true, true, 'html'], + ['png', '150', true, true, 'html'], + ['png', '150', false, true, 'html'], + ['png', '150', false, true, 'html'], + ['svg', '150', true, false, 'html'], ['svg', '300', true, false, 'html'], -// ['svg', '150', true, true, 'html'], -// ['svg', '200', true, true, 'html'], + ['svg', '150', true, true, 'html'], + ['svg', '200', true, true, 'html'], ]; foreach ($files as $file) { diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index ba0be752c..7d14588b9 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -473,13 +473,18 @@ class wsDocument extends cubeMetier $farmer = self::pickOneFarmServer(); $params = ['page' => $page, 'format' => $format, 'resolution' => $resolution, 'withText' => $withText, 'withGraphics' => $withGraphics, 'version' => $version, 'force' => $force, 'out' => $this->out, 'resolutionRatio' => $this->getResolutionRatio(), 'mobileRatio' => $this->getMobileFirstRatio()]; - $cl = new CubeIT_CommandLine('/usr/local/fluidbook_processfarm/bin/process', null, false); + $cl = new CubeIT_CommandLine('/usr/local/fluidbook_processfarm/bin/process', null, true); $cl->setSSH($farmer['host'], 'fluidbookfarmer', '', $farmer['port'] ?? 22, '/home/extranet/.ssh/id_rsa'); $cl->setManualArg(base64_encode(json_encode($params))); $cl->execute(); $o = trim($cl->output); + if (preg_match('|/data1/extranet/www/[^\s]+|', $o, $matches)) { + $o = $matches[0]; + } if (file_exists($o)) { return $o; + } else { + echo $cl->output; } return false; }