From b558a518d192dac07abde6b5c7e6d11fe2ab976d Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 30 Oct 2020 18:39:42 +0000 Subject: [PATCH] wait #4021 @0.75 --- inc/ws/Controlleur/class.ws.url.php | 82 +++++++++++++++-------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 2fa4afcc7..930bdb486 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -1123,7 +1123,10 @@ html.tall{height:150%}' . "\n"; } if (count($e) == 2) { $e[2] = $time; - http::redirect(SITE_PATH . 'viewerh/' . implode('_', $e) . '/' . $q); + $daoTheme = new wsDAOTheme($core->con); + $theme = $daoTheme->getThemeOfBook($book_id, true); + self::loadingCompile(SITE_PATH . 'viewerh/' . implode('_', $e) . '/' . $q, $book, $theme); + //http::redirect(SITE_PATH . 'viewerh/' . implode('_', $e) . '/' . $q); exit; } $CrawlerDetect = new Jaybizzle\CrawlerDetect\CrawlerDetect(); @@ -1139,46 +1142,45 @@ html.tall{height:150%}' . "\n"; } - public static function viewers($args) + public static function loadingCompile($url, $book, $theme) { - global $core; - - $args = cubePage::getArgs($args); - - $e = explode('_', $args[0]); - - $book_id = $e[0]; - $hash = $e[1]; - - $dao = new wsDAOBook($core->con); - - $book = $dao->selectById($book_id); - if ($hash != 'bcf26f9cf4a795ec00b9a44f42750d58' && $book->hash != $hash) { - commonDroits::error(); - } - - if (!wsDroits::admin()) { - if ($book->parametres->redirectDemo != '') { - http::redirect($book->parametres->redirectDemo); - exit; - } - if ($book->parametres->disableDemo) { - commonDroits::error(); - } - } - - $dao->compile($book_id, 'html5', false, false, false, $book); - $time = TIME; - - if (count($e) == 2 || $e[2] <= $time - 10) { - $e[2] = $time; - http::redirect(SITE_PATH . 'viewers/' . implode('_', $e) . '/'); - exit; - } - - $book_id = $e[0]; - $hash = $e[1]; - self::commonHTML5Viewer($book_id, $hash, '', ['' => '']); + $res = ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ' + + + + '; + $res .= '

' . __('Compilation du fluidbook en cours') . '...

'; + $res .= '

' . __('Cette étape ne sera pas nécessaire lorsque le fluidbook sera installé installé sur son emplacement définitif') . '

'; + $res .= ''; + $res .= ''; + echo $res; } public static function commonHTML5Viewer($book_id, $hash, $version = '', $replace = []) -- 2.39.5