From: vincent@cubedesigners.com Date: Tue, 8 Sep 2020 16:46:33 +0000 (+0000) Subject: wait #3878 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6fc207c01acccafae230f949a679d29fd1efc7f8;p=cubeextranet.git wait #3878 @0.25 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index ed463dcd4..bb2faf439 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -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); } } diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 30ef8aa9b..d16373673 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -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(); diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index d36fa2899..1050913e2 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -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);