]> _ Git - cubeextranet.git/commitdiff
wait #3878 @0.25
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 8 Sep 2020 16:46:33 +0000 (16:46 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 8 Sep 2020 16:46:33 +0000 (16:46 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Controlleur/class.ws.services.php
inc/ws/Controlleur/class.ws.url.php

index ed463dcd4e85af91adc4c728b957bad3db466c39..bb2faf439c06c17f84ee1e9cc988ac4e3aaef92f 100644 (file)
@@ -1325,11 +1325,12 @@ class wsMaintenance
         $dao = new wsDAOBook($core->con);
         $books = $dao->selectAll();
         foreach ($books as $book) {
-            file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $book->cid . '&j=' . TIME);
+            file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $book->cid . '&j=' . TIME . '&forcecompile=1');
         }
     }
 
-    public static function _socialImage($cid){
+    public static function _socialImage($cid)
+    {
         file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $cid . '&j=' . TIME);
     }
 }
index 30ef8aa9bc088233fee92cbb2d7a2ebc2f1fc0ed..d163736735d2faa55bf85593cf2b4917822f02a5 100644 (file)
@@ -199,6 +199,13 @@ class wsServices extends cubeFlashGateway
                 $limit = TIME - (3600 * 24 * 5);
 
                 if (isset($_GET['force']) || !file_exists($cover) || filemtime($cover) < $limit) {
+                    $url = 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '_' . TIME . '/?nointerface=1';
+                    if (isset($_GET['forcecompile'])) {
+                        $url .= '&force=1';
+                    }
+                    $url .= '#/page/0';
+
+
                     $w = 1200;
                     $h = 628;
                     $tmp = CubeIT_Files::tempnam() . '.svg';
@@ -209,7 +216,7 @@ class wsServices extends cubeFlashGateway
                     $cl->setArg('min-width', $w);
                     $cl->setArg('min-height', $h);
                     $cl->setArg('zoom-factor', 0.5);
-                    $cl->setArg('url', 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '_' . TIME . '/?nointerface=1#/page/0');
+                    $cl->setArg('url', $url);
                     $cl->setArg('delay', 10000);
                     $cl->setArg('out', $tmp);
                     $cl->execute();
index d36fa289986b7b53ba81d41551ed89ab4f952360..1050913e2c6b071a7045efe898acb0f4a8b406ee 100644 (file)
@@ -1142,7 +1142,7 @@ html.tall{height:150%}' . "\n";
             exit;
         }
         $CrawlerDetect = new Jaybizzle\CrawlerDetect\CrawlerDetect();
-        if (!$nointerface && !$CrawlerDetect->isCrawler()) {
+        if (!isset($_GET['force']) && !$nointerface && !$CrawlerDetect->isCrawler()) {
             $book->parametres->scorm_enable = false;
             $dao->compile($book_id, 'html5', false, false, false, $book, false);
             wsMaintenance::_socialImage($book->cid);