]> _ Git - cubeextranet.git/commitdiff
fix #3930 @0.25
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 2 Oct 2020 12:25:13 +0000 (12:25 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 2 Oct 2020 12:25:13 +0000 (12:25 +0000)
inc/ws/Controlleur/class.ws.services.php

index d163736735d2faa55bf85593cf2b4917822f02a5..f240e1a411650dad54afeff076d58f43588af547 100644 (file)
@@ -197,8 +197,9 @@ class wsServices extends cubeFlashGateway
             if (!isset($cover)) {
                 $cover = WS_FILES . '/social_image/' . $id . '.jpg';
                 $limit = TIME - (3600 * 24 * 5);
+                $minsize = 20 * 1024;
 
-                if (isset($_GET['force']) || !file_exists($cover) || filemtime($cover) < $limit) {
+                if (isset($_GET['force']) || !file_exists($cover) || filemtime($cover) < $limit || filesize($cover) < $minsize) {
                     $url = 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '_' . TIME . '/?nointerface=1';
                     if (isset($_GET['forcecompile'])) {
                         $url .= '&force=1';