]> _ Git - cubeextranet.git/commitdiff
wip #5220 @0.75
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 8 Apr 2022 16:57:39 +0000 (16:57 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 8 Apr 2022 16:57:39 +0000 (16:57 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Metier/class.ws.document.php

index 8ce1594efb0b215ec470ddb442fde98e53ddfa02..449eac7cc9e7389b75a68f9bc11c62e1d04a5326 100644 (file)
@@ -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) {
index ba0be752cb34ceb78ce7c64d31d856fb4dfe2d6f..7d14588b9cc22a327d74c9e8f02bfe056a768f0f 100644 (file)
@@ -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;
     }